ProgramComputer
commited on
Commit
•
4b88691
1
Parent(s):
67b1e3a
Update test.py
Browse files
test.py
CHANGED
@@ -285,7 +285,7 @@ class Test(datasets.GeneratorBasedBuilder):
|
|
285 |
for target in targets
|
286 |
)
|
287 |
)
|
288 |
-
|
289 |
dict( (
|
290 |
placeholder_key,
|
291 |
dict(
|
@@ -295,9 +295,17 @@ class Test(datasets.GeneratorBasedBuilder):
|
|
295 |
)
|
296 |
for placeholder_key in ("dev",)
|
297 |
)
|
298 |
-
)
|
299 |
-
|
300 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
301 |
dict( (
|
302 |
placeholder_key,
|
303 |
dict(
|
@@ -307,8 +315,8 @@ class Test(datasets.GeneratorBasedBuilder):
|
|
307 |
)
|
308 |
for placeholder_key in ("test",)
|
309 |
)
|
310 |
-
))
|
311 |
-
|
312 |
raise Exception(mapped_paths)
|
313 |
|
314 |
# tmp_paths = dl_manager.extract_and_download(
|
|
|
285 |
for target in targets
|
286 |
)
|
287 |
)
|
288 |
+
tmp_paths = dl_manager.download(
|
289 |
dict( (
|
290 |
placeholder_key,
|
291 |
dict(
|
|
|
295 |
)
|
296 |
for placeholder_key in ("dev",)
|
297 |
)
|
298 |
+
)
|
299 |
+
mapped_paths = {dev:{}}
|
300 |
+
for key,value in tmp_paths["dev"].items():
|
301 |
+
with open(value[0], "wb") as out:
|
302 |
+
mapped_paths['dev'][key] = (value[0])
|
303 |
+
for tmp_path in tmp_paths[1:]:
|
304 |
+
with open(tmp_path, "rb") as tmp:
|
305 |
+
copyfileobj(tmp, out)
|
306 |
+
tmp_path.unlink()
|
307 |
+
|
308 |
+
mapped_paths = mapped_paths.append(dl_manager.extract( dl_manager.download(
|
309 |
dict( (
|
310 |
placeholder_key,
|
311 |
dict(
|
|
|
315 |
)
|
316 |
for placeholder_key in ("test",)
|
317 |
)
|
318 |
+
)))
|
319 |
+
|
320 |
raise Exception(mapped_paths)
|
321 |
|
322 |
# tmp_paths = dl_manager.extract_and_download(
|