test
Browse files- the-vault-function.py +11 -8
the-vault-function.py
CHANGED
@@ -132,6 +132,7 @@ class TheVaultFunction(datasets.GeneratorBasedBuilder):
|
|
132 |
languages = _LANG_CONFIGS[1:]
|
133 |
|
134 |
for split in split_set:
|
|
|
135 |
for language in languages:
|
136 |
num_shards = num_shard_split[f"{split}/{language}"]
|
137 |
data_files = [
|
@@ -139,14 +140,16 @@ class TheVaultFunction(datasets.GeneratorBasedBuilder):
|
|
139 |
for _index in range(num_shards)
|
140 |
]
|
141 |
files = dl_manager.download(data_files)
|
142 |
-
|
143 |
-
|
144 |
-
|
145 |
-
|
146 |
-
|
147 |
-
|
148 |
-
|
149 |
-
|
|
|
|
|
150 |
return generators
|
151 |
|
152 |
def _generate_examples(self, files):
|
|
|
132 |
languages = _LANG_CONFIGS[1:]
|
133 |
|
134 |
for split in split_set:
|
135 |
+
split_files = []
|
136 |
for language in languages:
|
137 |
num_shards = num_shard_split[f"{split}/{language}"]
|
138 |
data_files = [
|
|
|
140 |
for _index in range(num_shards)
|
141 |
]
|
142 |
files = dl_manager.download(data_files)
|
143 |
+
split_files.extend(files)
|
144 |
+
|
145 |
+
generators.append(
|
146 |
+
datasets.SplitGenerator(
|
147 |
+
name=split.replace("/", "_"),
|
148 |
+
gen_kwargs={
|
149 |
+
"files": split_files,
|
150 |
+
},
|
151 |
+
),
|
152 |
+
)
|
153 |
return generators
|
154 |
|
155 |
def _generate_examples(self, files):
|