visualjoyce commited on
Commit
15d8b61
1 Parent(s): 15cb60b

fix download

Browse files
Files changed (1) hide show
  1. ipquiz.py +12 -12
ipquiz.py CHANGED
@@ -83,13 +83,13 @@ class IPQuizDataset(datasets.GeneratorBasedBuilder):
83
  {
84
  "language": datasets.Value("string"),
85
  "problem": datasets.Value("string"),
86
- "candidates": datasets.Sequence(
87
- {
88
- "texts": datasets.Value("string"),
89
- "options": datasets.Value("string"),
90
- }
91
- ),
92
- # "candidates": datasets.Value("string"),
93
  "answer": datasets.Value("string")
94
  # These are the features of your dataset like images, labels ...
95
  }
@@ -140,10 +140,10 @@ class IPQuizDataset(datasets.GeneratorBasedBuilder):
140
  yield key, {
141
  "language": row["language"],
142
  "problem": row["problem"],
143
- "candidates": {
144
- "texts": [v for k, v in row["candidates"].items()],
145
- "options": [k for k, v in row["candidates"].items()],
146
- },
147
- #"candidates": str(row["candidates"]),
148
  "answer": row['answer'],
149
  }
 
83
  {
84
  "language": datasets.Value("string"),
85
  "problem": datasets.Value("string"),
86
+ # "candidates": datasets.Sequence(
87
+ # {
88
+ # "texts": datasets.Value("string"),
89
+ # "options": datasets.Value("string"),
90
+ # }
91
+ # ),
92
+ "candidates": datasets.Value("string"),
93
  "answer": datasets.Value("string")
94
  # These are the features of your dataset like images, labels ...
95
  }
 
140
  yield key, {
141
  "language": row["language"],
142
  "problem": row["problem"],
143
+ #"candidates": {
144
+ # "texts": [v for k, v in row["candidates"].items()],
145
+ # "options": [k for k, v in row["candidates"].items()],
146
+ #},
147
+ "candidates": json.dumps(row["candidates"]),
148
  "answer": row['answer'],
149
  }