Skip to content

Commit 4c95331

Browse files
claravaniajeswan
andauthored
Fix tokenization for arc_easy and arc_challenge (#1214)
Co-authored-by: jeswan <57466294+jeswan@users.noreply.github.com>
1 parent 442a2b0 commit 4c95331

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

jiant/tasks/lib/arc_challenge.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,15 +61,15 @@ def _create_examples(cls, lines, set_type):
6161
label = line["answerKey"]
6262
if label in potential_label_map:
6363
label = potential_label_map[label]
64-
choice_list = [d["text"] for d in line["question"]["choices"]]
64+
choice_list = [d for d in line["choices"]["text"]]
6565
filler_choice_list = ["." for i in range(NUM_CHOICES - len(choice_list))]
6666
choice_list = choice_list + filler_choice_list
6767
assert len(choice_list) == NUM_CHOICES
6868

6969
examples.append(
7070
Example(
7171
guid="%s-%s" % (set_type, i),
72-
prompt=line["question"]["stem"],
72+
prompt=line["question"],
7373
choice_list=choice_list,
7474
label=label,
7575
)

jiant/tasks/lib/arc_easy.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,15 +61,15 @@ def _create_examples(cls, lines, set_type):
6161
label = line["answerKey"]
6262
if label in potential_label_map:
6363
label = potential_label_map[label]
64-
choice_list = [d["text"] for d in line["question"]["choices"]]
64+
choice_list = [d for d in line["choices"]["text"]]
6565
filler_choice_list = ["." for i in range(NUM_CHOICES - len(choice_list))]
6666
choice_list = choice_list + filler_choice_list
6767
assert len(choice_list) == NUM_CHOICES
6868

6969
examples.append(
7070
Example(
7171
guid="%s-%s" % (set_type, i),
72-
prompt=line["question"]["stem"],
72+
prompt=line["question"],
7373
choice_list=choice_list,
7474
label=label,
7575
)

0 commit comments

Comments
 (0)