Skip to content

Commit

Permalink
Fix tokenization for arc_easy and arc_challenge (#1214)
Browse files Browse the repository at this point in the history
Co-authored-by: jeswan <[email protected]>
  • Loading branch information
claravania and jeswan authored Oct 26, 2020
1 parent 442a2b0 commit 4c95331
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions jiant/tasks/lib/arc_challenge.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,15 +61,15 @@ def _create_examples(cls, lines, set_type):
label = line["answerKey"]
if label in potential_label_map:
label = potential_label_map[label]
choice_list = [d["text"] for d in line["question"]["choices"]]
choice_list = [d for d in line["choices"]["text"]]
filler_choice_list = ["." for i in range(NUM_CHOICES - len(choice_list))]
choice_list = choice_list + filler_choice_list
assert len(choice_list) == NUM_CHOICES

examples.append(
Example(
guid="%s-%s" % (set_type, i),
prompt=line["question"]["stem"],
prompt=line["question"],
choice_list=choice_list,
label=label,
)
Expand Down
4 changes: 2 additions & 2 deletions jiant/tasks/lib/arc_easy.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,15 +61,15 @@ def _create_examples(cls, lines, set_type):
label = line["answerKey"]
if label in potential_label_map:
label = potential_label_map[label]
choice_list = [d["text"] for d in line["question"]["choices"]]
choice_list = [d for d in line["choices"]["text"]]
filler_choice_list = ["." for i in range(NUM_CHOICES - len(choice_list))]
choice_list = choice_list + filler_choice_list
assert len(choice_list) == NUM_CHOICES

examples.append(
Example(
guid="%s-%s" % (set_type, i),
prompt=line["question"]["stem"],
prompt=line["question"],
choice_list=choice_list,
label=label,
)
Expand Down

0 comments on commit 4c95331

Please sign in to comment.