fix dl of files
Browse files
wow.py
CHANGED
@@ -57,18 +57,21 @@ class WOW(datasets.GeneratorBasedBuilder):
|
|
57 |
)
|
58 |
|
59 |
def _split_generators(self, dl_manager):
|
|
|
|
|
|
|
60 |
return [
|
61 |
datasets.SplitGenerator(
|
62 |
name=datasets.Split.TRAIN,
|
63 |
-
gen_kwargs={"filename":
|
64 |
),
|
65 |
datasets.SplitGenerator(
|
66 |
name=datasets.Split.VALIDATION,
|
67 |
-
gen_kwargs={"filename":
|
68 |
),
|
69 |
datasets.SplitGenerator(
|
70 |
name=datasets.Split.TEST,
|
71 |
-
gen_kwargs={"filename":
|
72 |
)
|
73 |
]
|
74 |
|
|
|
57 |
)
|
58 |
|
59 |
def _split_generators(self, dl_manager):
|
60 |
+
train_filename = dl_manager.download_and_extract("data/train.json")
|
61 |
+
valid_filename = dl_manager.download_and_extract(f"data/valid_{self.config.split}_split.json")
|
62 |
+
test_filename = dl_manager.download_and_extract(f"data/test_{self.config.split}_split.json")
|
63 |
return [
|
64 |
datasets.SplitGenerator(
|
65 |
name=datasets.Split.TRAIN,
|
66 |
+
gen_kwargs={"filename": train_filename},
|
67 |
),
|
68 |
datasets.SplitGenerator(
|
69 |
name=datasets.Split.VALIDATION,
|
70 |
+
gen_kwargs={"filename": valid_filename},
|
71 |
),
|
72 |
datasets.SplitGenerator(
|
73 |
name=datasets.Split.TEST,
|
74 |
+
gen_kwargs={"filename": test_filename},
|
75 |
)
|
76 |
]
|
77 |
|