visualjoyce
commited on
Commit
•
902ee39
1
Parent(s):
73d7a53
fix download
Browse files
ipquiz.py
CHANGED
@@ -83,13 +83,13 @@ class IPQuizDataset(datasets.GeneratorBasedBuilder):
|
|
83 |
{
|
84 |
"language": datasets.Value("string"),
|
85 |
"problem": datasets.Value("string"),
|
86 |
-
|
87 |
-
|
88 |
-
|
89 |
-
|
90 |
-
|
91 |
-
|
92 |
-
"candidates": datasets.Value("string"),
|
93 |
"answer": datasets.Value("string")
|
94 |
# These are the features of your dataset like images, labels ...
|
95 |
}
|
@@ -141,7 +141,10 @@ class IPQuizDataset(datasets.GeneratorBasedBuilder):
|
|
141 |
yield key, {
|
142 |
"language": row["language"],
|
143 |
"problem": row["problem"],
|
144 |
-
|
145 |
-
|
|
|
|
|
|
|
146 |
"answer": row['answer'],
|
147 |
}
|
|
|
83 |
{
|
84 |
"language": datasets.Value("string"),
|
85 |
"problem": datasets.Value("string"),
|
86 |
+
"candidates": datasets.features.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 |
}
|
|
|
141 |
yield key, {
|
142 |
"language": row["language"],
|
143 |
"problem": row["problem"],
|
144 |
+
"candidates": {
|
145 |
+
"options": [k for k, v in row["candidates"].items()],
|
146 |
+
"texts": [v for k, v in row["candidates"].items()],
|
147 |
+
},
|
148 |
+
#"candidates": str(row["candidates"]),
|
149 |
"answer": row['answer'],
|
150 |
}
|