amphora commited on
Commit
e2e0f48
1 Parent(s): 83884fc

Update csatqa.py

Browse files
Files changed (1) hide show
  1. csatqa.py +4 -6
csatqa.py CHANGED
@@ -60,16 +60,14 @@ class CSATQA(datasets.GeneratorBasedBuilder):
60
  name=datasets.Split.TRAIN,
61
  gen_kwargs={
62
  "filepath": train_path,
63
- "split": "train"
64
  },
65
  ),
66
  ]
67
 
68
- def _generate_examples(self, filepath, split):
69
  with open(filepath, encoding="utf-8") as f:
70
  for key, row in enumerate(f):
71
  data = json.loads(row)
72
- if split == self.config.name:
73
- data["gold"] = int(data["gold"]) - 1
74
- data.pop("split")
75
- yield key, data
 
60
  name=datasets.Split.TRAIN,
61
  gen_kwargs={
62
  "filepath": train_path,
 
63
  },
64
  ),
65
  ]
66
 
67
+ def _generate_examples(self, filepath):
68
  with open(filepath, encoding="utf-8") as f:
69
  for key, row in enumerate(f):
70
  data = json.loads(row)
71
+ data["gold"] = int(data["gold"]) - 1
72
+ data.pop("split")
73
+ yield key, data