ProgramComputer commited on
Commit
2800183
1 Parent(s): 72239bc

Update test.py

Browse files
Files changed (1) hide show
  1. test.py +23 -9
test.py CHANGED
@@ -285,8 +285,20 @@ class Test(datasets.GeneratorBasedBuilder):
285
  for target in targets
286
  )
287
  )
 
 
 
 
 
 
 
 
 
 
288
 
289
- mapped_paths = dl_manager.extract(dl_manager.custom_download(
 
 
290
 
291
  dict(
292
  (
@@ -296,14 +308,16 @@ class Test(datasets.GeneratorBasedBuilder):
296
  for target in targets
297
  ),
298
  )
299
- for placeholder_key in ("placeholder", "test")
300
- ),
301
- download_custom,
302
-
303
-
304
-
305
- ))
306
-
 
 
307
  return [
308
  datasets.SplitGenerator(
309
  name="train",
 
285
  for target in targets
286
  )
287
  )
288
+ mapped_paths = dl_manager.download_and_extract( dict(
289
+ (
290
+ placeholder_key,
291
+ dict(
292
+ (target, _URLS[target][placeholder_key])
293
+ for target in targets
294
+ ),
295
+ )
296
+ for placeholder_key in ("test")
297
+ ))
298
 
299
+
300
+
301
+ tmp_paths = dl_manager.extract_and_download(
302
 
303
  dict(
304
  (
 
308
  for target in targets
309
  ),
310
  )
311
+ for placeholder_key in ("placeholder")
312
+ ))
313
+ with open(tmp_paths[0], "wb") as out:
314
+ for tmp_path in tmp_paths[1:]:
315
+ with open(tmp_path, "rb") as tmp:
316
+ copyfileobj(tmp, out)
317
+ tmp_path.unlink()
318
+ mapped_paths = mapped_paths.append(tmp_paths[0])
319
+ print(mapped_paths)
320
+
321
  return [
322
  datasets.SplitGenerator(
323
  name="train",