kimvu commited on
Commit
34c2919
·
1 Parent(s): cd69041

Update agieval.py

Browse files
Files changed (1) hide show
  1. agieval.py +2 -21
agieval.py CHANGED
@@ -71,15 +71,7 @@ class AgiEval(datasets.GeneratorBasedBuilder):
71
  "solution": datasets.Value("string"),
72
  }
73
  )
74
- elif self.config.name in ["sat_en", "sat_math"]:
75
- features = datasets.Features(
76
- {"question": datasets.Value("string"),
77
- "options": datasets.features.Sequence(datasets.Value("string")),
78
- "label": datasets.ClassLabel(num_classes=4, names=["A", "B", "C", "D"]),
79
- "solution": datasets.Value("string"),
80
- }
81
- )
82
- elif self.config.name in ["sat-en-without-passage"]:
83
  features = datasets.Features(
84
  {"passage": datasets.Value("string"),
85
  "question": datasets.Value("string"),
@@ -295,18 +287,7 @@ class AgiEval(datasets.GeneratorBasedBuilder):
295
  "label": "",
296
  "solution": "",
297
  }
298
- elif self.config.name in ["sat_en", "sat_math"]:
299
- label_index = "ABCDE".index(data["label"])
300
- if label_index > len(data["options"]) - 1:
301
- continue
302
- else:
303
- yield key, {
304
- "question": data["question"],
305
- "options": data["options"],
306
- "label": data["label"],
307
- "solution": data["other"]["solution"],
308
- }
309
- elif self.config.name in ["sat-en-without-passage"]:
310
  label_index = "ABCDE".index(data["label"])
311
  if label_index > len(data["options"]) - 1:
312
  continue
 
71
  "solution": datasets.Value("string"),
72
  }
73
  )
74
+ elif self.config.name in ["sat_en", "sat_math", "sat-en-without-passage"]:
 
 
 
 
 
 
 
 
75
  features = datasets.Features(
76
  {"passage": datasets.Value("string"),
77
  "question": datasets.Value("string"),
 
287
  "label": "",
288
  "solution": "",
289
  }
290
+ elif self.config.name in ["sat-en-without-passage", "sat_en", "sat_math"]:
 
 
 
 
 
 
 
 
 
 
 
291
  label_index = "ABCDE".index(data["label"])
292
  if label_index > len(data["options"]) - 1:
293
  continue