Update agieval.py
Browse files- agieval.py +6 -6
agieval.py
CHANGED
@@ -67,7 +67,7 @@ _URLS = {
|
|
67 |
"aqua_rat": {
|
68 |
"test": HEAD+'aqua-rat.jsonl'
|
69 |
},
|
70 |
-
'
|
71 |
"test": HEAD+'math.jsonl'
|
72 |
},
|
73 |
'few_shot': {
|
@@ -125,7 +125,7 @@ class AgiEval(datasets.GeneratorBasedBuilder):
|
|
125 |
description="",
|
126 |
),
|
127 |
datasets.BuilderConfig(
|
128 |
-
name="
|
129 |
version=VERSION,
|
130 |
description="",
|
131 |
),
|
@@ -181,7 +181,7 @@ class AgiEval(datasets.GeneratorBasedBuilder):
|
|
181 |
"solution": datasets.Value("string"),
|
182 |
}
|
183 |
)
|
184 |
-
elif self.config.name == "
|
185 |
features = datasets.Features(
|
186 |
{"question": datasets.Value("string"),
|
187 |
"answer": datasets.Value("string"),
|
@@ -232,7 +232,7 @@ class AgiEval(datasets.GeneratorBasedBuilder):
|
|
232 |
# Mapping for column names in CSV to dataset names
|
233 |
names = {'aqua_rat': 'aqua-rat', 'sat_en': 'sat-en', 'sat_math': 'sat-math',
|
234 |
'lsat_ar': 'lsat-ar', 'lsat_lr': 'lsat-lr', 'lsat_rc': 'lsat-rc',
|
235 |
-
'logiqa_en': 'logiqa_en', 'logiqa_zh': 'logiqa_zh', '
|
236 |
|
237 |
if split == "few_shot":
|
238 |
# Load the data from the CSV
|
@@ -269,7 +269,7 @@ class AgiEval(datasets.GeneratorBasedBuilder):
|
|
269 |
"label": data["label"],
|
270 |
"solution": str(explanation_row),
|
271 |
}
|
272 |
-
elif self.config.name == "
|
273 |
if not data.get("level"):
|
274 |
data["level"] = data['other']['level']
|
275 |
if not data.get("type"):
|
@@ -327,7 +327,7 @@ class AgiEval(datasets.GeneratorBasedBuilder):
|
|
327 |
"label": data["label"],
|
328 |
"solution": data["label"],
|
329 |
}
|
330 |
-
elif self.config.name == "
|
331 |
if not data.get("level"):
|
332 |
data["level"] = data['other']['level']
|
333 |
if not data.get("type"):
|
|
|
67 |
"aqua_rat": {
|
68 |
"test": HEAD+'aqua-rat.jsonl'
|
69 |
},
|
70 |
+
'math': {
|
71 |
"test": HEAD+'math.jsonl'
|
72 |
},
|
73 |
'few_shot': {
|
|
|
125 |
description="",
|
126 |
),
|
127 |
datasets.BuilderConfig(
|
128 |
+
name="math",
|
129 |
version=VERSION,
|
130 |
description="",
|
131 |
),
|
|
|
181 |
"solution": datasets.Value("string"),
|
182 |
}
|
183 |
)
|
184 |
+
elif self.config.name == "math":
|
185 |
features = datasets.Features(
|
186 |
{"question": datasets.Value("string"),
|
187 |
"answer": datasets.Value("string"),
|
|
|
232 |
# Mapping for column names in CSV to dataset names
|
233 |
names = {'aqua_rat': 'aqua-rat', 'sat_en': 'sat-en', 'sat_math': 'sat-math',
|
234 |
'lsat_ar': 'lsat-ar', 'lsat_lr': 'lsat-lr', 'lsat_rc': 'lsat-rc',
|
235 |
+
'logiqa_en': 'logiqa_en', 'logiqa_zh': 'logiqa_zh', 'math': 'math'}
|
236 |
|
237 |
if split == "few_shot":
|
238 |
# Load the data from the CSV
|
|
|
269 |
"label": data["label"],
|
270 |
"solution": str(explanation_row),
|
271 |
}
|
272 |
+
elif self.config.name == "math":
|
273 |
if not data.get("level"):
|
274 |
data["level"] = data['other']['level']
|
275 |
if not data.get("type"):
|
|
|
327 |
"label": data["label"],
|
328 |
"solution": data["label"],
|
329 |
}
|
330 |
+
elif self.config.name == "math":
|
331 |
if not data.get("level"):
|
332 |
data["level"] = data['other']['level']
|
333 |
if not data.get("type"):
|