Datasets:
GEM
/

Tasks:
Other
Modalities:
Text
Languages:
English
ArXiv:
Tags:
question-generation
License:
Abinaya Mahendiran commited on
Commit
4d26f67
1 Parent(s): 24cb11f

Fixed minor bug in data loader script

Browse files
Files changed (1) hide show
  1. squad_v2.py +1 -1
squad_v2.py CHANGED
@@ -131,7 +131,7 @@ class SquadV2(datasets.GeneratorBasedBuilder):
131
  # TODO(squad_v2): Yields (key, example) tuples from the dataset
132
  with open(filepath, encoding="utf-8") as f:
133
  data = json.load(f)
134
- for id_, row in data["data"]:
135
  # Features currently used are "context", "question", and "answers".
136
  # Others are extracted here for the ease of future expansions.
137
  yield id_, {
 
131
  # TODO(squad_v2): Yields (key, example) tuples from the dataset
132
  with open(filepath, encoding="utf-8") as f:
133
  data = json.load(f)
134
+ for id_, row in enumerate(data["data"]):
135
  # Features currently used are "context", "question", and "answers".
136
  # Others are extracted here for the ease of future expansions.
137
  yield id_, {