ProgramComputer commited on
Commit
fecae0a
1 Parent(s): 049e6db

Update test.py

Browse files
Files changed (1) hide show
  1. test.py +5 -2
test.py CHANGED
@@ -275,9 +275,12 @@ class VoxCeleb(datasets.GeneratorBasedBuilder):
275
 
276
  #mapped_paths["test"] = {k:tuple(dl_manager.iter_files(e) for e in v) for k, v in mapped_paths["test"].items()}
277
  #mapped_paths["dev"] = {k:tuple(dl_manager.iter_files(e) for e in v) for k, v in mapped_paths["dev"].items()}
278
- mapped_paths["test"] = {k: tuple(f for f in dl_manager.iter_files(v) ) for k, v in mapped_paths["test"].items()}
279
- mapped_paths["dev"] = {k: tuple(f for value in v.values() for f in dl_manager.iter_files(value) ) for k, v in mapped_paths["dev"].items()}
 
280
 
 
 
281
  return [
282
  datasets.SplitGenerator(
283
  name="train",
 
275
 
276
  #mapped_paths["test"] = {k:tuple(dl_manager.iter_files(e) for e in v) for k, v in mapped_paths["test"].items()}
277
  #mapped_paths["dev"] = {k:tuple(dl_manager.iter_files(e) for e in v) for k, v in mapped_paths["dev"].items()}
278
+ #mapped_paths["test"] = {k: tuple(f for f in dl_manager.iter_files(v) ) for k, v in mapped_paths["test"].items()}
279
+ #mapped_paths["dev"] = {k: tuple(f for value in v.values() for f in dl_manager.iter_files(value) ) for k, v in mapped_paths["dev"].items()}
280
+ apply_function_recursive = lambda d, f: {k: apply_function_recursive(v, f) if isinstance(v, dict) else f(v) for k, v in d.items()}
281
 
282
+ mapped_paths = apply_function_recursive(original_dict, dl_manager.iter_files)
283
+ raise Exception(mapped_paths)
284
  return [
285
  datasets.SplitGenerator(
286
  name="train",