Update test_repo.py
Browse files- test_repo.py +24 -1
test_repo.py
CHANGED
@@ -124,7 +124,22 @@ class TestRepo(datasets.GeneratorBasedBuilder):
|
|
124 |
"options": datasets.Sequence(datasets.Value("string")),
|
125 |
"context": datasets.Sequence(datasets.Value("string")),
|
126 |
})),
|
127 |
-
})
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
128 |
}
|
129 |
|
130 |
return datasets.DatasetInfo(
|
@@ -205,4 +220,12 @@ class TestRepo(datasets.GeneratorBasedBuilder):
|
|
205 |
"question_type": data["question_type"],
|
206 |
"dataset_name": os.path.split(filepath)[-1].replace(".jsonl",""),
|
207 |
"few_shot_prompt": data["few_shot_prompt"]}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
208 |
key_idx +=1
|
|
|
124 |
"options": datasets.Sequence(datasets.Value("string")),
|
125 |
"context": datasets.Sequence(datasets.Value("string")),
|
126 |
})),
|
127 |
+
}),
|
128 |
+
"train_aqa": datasets.Features({
|
129 |
+
"question": datasets.Value("string"), # Simple string for the question
|
130 |
+
"answer": datasets.Value("string"), # List of strings for the answer
|
131 |
+
"prompt": datasets.Value("string") # Simple string for the prompt
|
132 |
+
}),
|
133 |
+
"val_aqa": datasets.Features({
|
134 |
+
"question": datasets.Value("string"), # Simple string for the question
|
135 |
+
"answer": datasets.Sequence(datasets.Value("string")), # List of strings for the answer
|
136 |
+
"prompt": datasets.Value("string") # Simple string for the prompt
|
137 |
+
}),
|
138 |
+
"test_aqa": datasets.Features({
|
139 |
+
"question": datasets.Value("string"), # Simple string for the question
|
140 |
+
"answer": datasets.Sequence(datasets.Value("string")), # List of strings for the answer
|
141 |
+
"prompt": datasets.Value("string") # Simple string for the prompt
|
142 |
+
}),
|
143 |
}
|
144 |
|
145 |
return datasets.DatasetInfo(
|
|
|
220 |
"question_type": data["question_type"],
|
221 |
"dataset_name": os.path.split(filepath)[-1].replace(".jsonl",""),
|
222 |
"few_shot_prompt": data["few_shot_prompt"]}
|
223 |
+
key_idx +=1
|
224 |
+
|
225 |
+
elif split in ["train_aqa", "val_aqa", "test_aqa"]:
|
226 |
+
yield key_idx, {
|
227 |
+
"prompt": data["prompt"],
|
228 |
+
"question": data["question"],
|
229 |
+
"answer": data["answer"],
|
230 |
+
"dataset_name": os.path.split(filepath)[-1].replace(".jsonl",""),
|
231 |
key_idx +=1
|