Datasets:
GEM
/

Tasks:
Other
Modalities:
Text
Languages:
English
ArXiv:
Tags:
question-generation
License:
Abinaya Mahendiran commited on
Commit
c2a7ed3
1 Parent(s): 88e074e

Fixed bug in data loader

Browse files
Files changed (1) hide show
  1. squad_v2.py +2 -2
squad_v2.py CHANGED
@@ -182,8 +182,8 @@ class SquadV2(datasets.GeneratorBasedBuilder):
182
  """Yields examples."""
183
  # TODO(squad_v2): Yields (key, example) tuples from the dataset
184
  with open(filepath, encoding="utf-8") as f:
185
- data = json.load(f)
186
- for id_, row in enumerate(data["data"]):
187
  # Features currently used are "context", "question", and "answers".
188
  # Others are extracted here for the ease of future expansions.
189
  yield id_, {
 
182
  """Yields examples."""
183
  # TODO(squad_v2): Yields (key, example) tuples from the dataset
184
  with open(filepath, encoding="utf-8") as f:
185
+ for id_, row in enumerate(f):
186
+ data = json.loads(row)
187
  # Features currently used are "context", "question", and "answers".
188
  # Others are extracted here for the ease of future expansions.
189
  yield id_, {