Datasets:
Commit
·
5a9eee5
1
Parent(s):
376ac1a
fix: Build splits properly
Browse files- scandiqa.py +4 -4
scandiqa.py
CHANGED
@@ -134,26 +134,26 @@ class ScandiQA(GeneratorBasedBuilder):
|
|
134 |
|
135 |
def _split_generators(self, dl_manager: DownloadManager) -> List[SplitGenerator]:
|
136 |
urls = _URLS[self.config.name]
|
137 |
-
|
138 |
return [
|
139 |
SplitGenerator(
|
140 |
name=str(Split.TRAIN),
|
141 |
gen_kwargs=dict(
|
142 |
-
filepath=
|
143 |
split="train",
|
144 |
),
|
145 |
),
|
146 |
SplitGenerator(
|
147 |
name=str(Split.VALIDATION),
|
148 |
gen_kwargs=dict(
|
149 |
-
filepath=
|
150 |
split="val",
|
151 |
),
|
152 |
),
|
153 |
SplitGenerator(
|
154 |
name=str(Split.TEST),
|
155 |
gen_kwargs=dict(
|
156 |
-
filepath=
|
157 |
split="test"
|
158 |
),
|
159 |
),
|
|
|
134 |
|
135 |
def _split_generators(self, dl_manager: DownloadManager) -> List[SplitGenerator]:
|
136 |
urls = _URLS[self.config.name]
|
137 |
+
downloaded_files = dl_manager.download_and_extract(urls)
|
138 |
return [
|
139 |
SplitGenerator(
|
140 |
name=str(Split.TRAIN),
|
141 |
gen_kwargs=dict(
|
142 |
+
filepath=downloaded_files["train"],
|
143 |
split="train",
|
144 |
),
|
145 |
),
|
146 |
SplitGenerator(
|
147 |
name=str(Split.VALIDATION),
|
148 |
gen_kwargs=dict(
|
149 |
+
filepath=downloaded_files["val"],
|
150 |
split="val",
|
151 |
),
|
152 |
),
|
153 |
SplitGenerator(
|
154 |
name=str(Split.TEST),
|
155 |
gen_kwargs=dict(
|
156 |
+
filepath=downloaded_files["test"],
|
157 |
split="test"
|
158 |
),
|
159 |
),
|