Yassine
commited on
Commit
•
ae19be5
1
Parent(s):
d9f636a
only dl data_files
Browse files- commavq.py +2 -1
commavq.py
CHANGED
@@ -1,6 +1,7 @@
|
|
1 |
import datasets
|
2 |
import os
|
3 |
import numpy as np
|
|
|
4 |
|
5 |
SHARD_SIZE = 2500
|
6 |
NUM_SHARDS = 40
|
@@ -25,7 +26,7 @@ class CommaVQ(datasets.GeneratorBasedBuilder):
|
|
25 |
def _split_generators(self, dl_manager):
|
26 |
"""Returns SplitGenerators."""
|
27 |
dl_manager.download_config.ignore_url_params = True
|
28 |
-
to_dl = self.config.data_files.items() if self.config.data_files is not None else _DATA_FILES
|
29 |
downloaded_files = dl_manager.download(to_dl)
|
30 |
local_extracted_archive = dl_manager.extract(downloaded_files) if not dl_manager.is_streaming else [None]*len(downloaded_files)
|
31 |
return [
|
|
|
1 |
import datasets
|
2 |
import os
|
3 |
import numpy as np
|
4 |
+
import itertools
|
5 |
|
6 |
SHARD_SIZE = 2500
|
7 |
NUM_SHARDS = 40
|
|
|
26 |
def _split_generators(self, dl_manager):
|
27 |
"""Returns SplitGenerators."""
|
28 |
dl_manager.download_config.ignore_url_params = True
|
29 |
+
to_dl = list(itertools.chain(*[x[1] for x in self.config.data_files.items()])) if self.config.data_files is not None else _DATA_FILES
|
30 |
downloaded_files = dl_manager.download(to_dl)
|
31 |
local_extracted_archive = dl_manager.extract(downloaded_files) if not dl_manager.is_streaming else [None]*len(downloaded_files)
|
32 |
return [
|