Skip to content

Commit

Permalink
Fix KeyError when evaluating
Browse files Browse the repository at this point in the history
remove the debug code to fix KeyError when evaluating
  • Loading branch information
cooelf committed Jun 27, 2020
1 parent 18c68c7 commit db4aa56
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions transformer-mrc/transformers/data/processors/squad.py
Original file line number Diff line number Diff line change
Expand Up @@ -527,9 +527,9 @@ def _create_examples(self, input_data, set_type):
examples = []
for entry in tqdm(input_data):
title = entry["title"]
for paragraph in entry["paragraphs"][:1]:
for paragraph in entry["paragraphs"]:
context_text = paragraph["context"]
for qa in paragraph["qas"][:1]:
for qa in paragraph["qas"]:
qas_id = qa["id"]
question_text = qa["question"]
start_position_character = None
Expand Down

1 comment on commit db4aa56

@yangcheng2020
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

好的,我试试,非常感谢!!!

Please sign in to comment.