baber commited on
Commit
efe0a75
1 Parent(s): 8c9fc75

Update agieval.py

Browse files

removed row if label > num_of_choices in `sat_en`

Files changed (1) hide show
  1. agieval.py +20 -30
agieval.py CHANGED
@@ -77,19 +77,9 @@ _URLS = {
77
  class AgiEval(datasets.GeneratorBasedBuilder):
78
  """TODO: Short description of my dataset."""
79
 
80
- VERSION = datasets.Version("2.0.0")
 
81
 
82
- # This is an example of a dataset with multiple configurations.
83
- # If you don't want/need to define several sub-sets in your dataset,
84
- # just remove the BUILDER_CONFIG_CLASS and the BUILDER_CONFIGS attributes.
85
-
86
- # If you need to make complex sub-parts in the datasets with configurable options
87
- # You can create your own builder configuration class to store attribute, inheriting from datasets.BuilderConfig
88
- # BUILDER_CONFIG_CLASS = MyBuilderConfig
89
-
90
- # You will be able to load one or the other configurations in the following list with
91
- # data = datasets.load_dataset('my_dataset', 'first_domain')
92
- # data = datasets.load_dataset('my_dataset', 'second_domain')
93
  BUILDER_CONFIGS = [
94
  datasets.BuilderConfig(
95
  name="aqua_rat",
@@ -267,17 +257,13 @@ class AgiEval(datasets.GeneratorBasedBuilder):
267
  }
268
 
269
  elif self.config.name == "sat_en":
270
- label_index = "ABCDE".index(data["label"])
271
- if label_index > len(data["options"]) - 1:
272
- continue
273
- else:
274
- yield key, {
275
- "passage": data["passage"],
276
- "question": data["question"],
277
- "options": data["options"],
278
- "label": data["label"],
279
- "solution": str(explanation_row),
280
- }
281
  elif self.config.name in ['lsat_lr', 'lsat_rc', 'lsat_ar']:
282
  yield key, {
283
  "question": data["question"],
@@ -321,13 +307,17 @@ class AgiEval(datasets.GeneratorBasedBuilder):
321
  }
322
 
323
  elif self.config.name == "sat_en":
324
- yield key, {
325
- "passage": data["passage"],
326
- "question": data["question"],
327
- "options": data["options"],
328
- "label": data["label"],
329
- "solution": data["other"]["solution"],
330
- }
 
 
 
 
331
  elif self.config.name in ['lsat_lr', 'lsat_rc', 'lsat_ar']:
332
  yield key, {
333
  "question": data["question"],
 
77
  class AgiEval(datasets.GeneratorBasedBuilder):
78
  """TODO: Short description of my dataset."""
79
 
80
+ VERSION = datasets.Version("2.0.1")
81
+ # 25/08/2023: Removed row 56 of `sat_en`(label > num_of_choices).
82
 
 
 
 
 
 
 
 
 
 
 
 
83
  BUILDER_CONFIGS = [
84
  datasets.BuilderConfig(
85
  name="aqua_rat",
 
257
  }
258
 
259
  elif self.config.name == "sat_en":
260
+ yield key, {
261
+ "passage": data["passage"],
262
+ "question": data["question"],
263
+ "options": data["options"],
264
+ "label": data["label"],
265
+ "solution": str(explanation_row),
266
+ }
 
 
 
 
267
  elif self.config.name in ['lsat_lr', 'lsat_rc', 'lsat_ar']:
268
  yield key, {
269
  "question": data["question"],
 
307
  }
308
 
309
  elif self.config.name == "sat_en":
310
+ label_index = "ABCDE".index(data["label"])
311
+ if label_index > len(data["options"]) - 1:
312
+ continue
313
+ else:
314
+ yield key, {
315
+ "passage": data["passage"],
316
+ "question": data["question"],
317
+ "options": data["options"],
318
+ "label": data["label"],
319
+ "solution": data["other"]["solution"],
320
+ }
321
  elif self.config.name in ['lsat_lr', 'lsat_rc', 'lsat_ar']:
322
  yield key, {
323
  "question": data["question"],