Datasets:
License:
Update aftdb.py
Browse files
aftdb.py
CHANGED
@@ -141,6 +141,12 @@ class AFT_Dataset(datasets.GeneratorBasedBuilder):
|
|
141 |
)
|
142 |
if dl_manager.is_streaming:
|
143 |
downloaded_files = dl_manager.download(all_path)
|
|
|
|
|
|
|
|
|
|
|
|
|
144 |
else:
|
145 |
downloaded_files = dl_manager.download_and_extract(all_path)
|
146 |
return [
|
@@ -163,9 +169,7 @@ class AFT_Dataset(datasets.GeneratorBasedBuilder):
|
|
163 |
def _generate_examples(self, filepaths, is_streaming):
|
164 |
if is_streaming:
|
165 |
_json, _jpg = False, False
|
166 |
-
|
167 |
-
for path_tar in filepaths:
|
168 |
-
iter_tar = dl_manager.iter_archive(path_tar)
|
169 |
for path, file_obj in iter_tar:
|
170 |
if path.endswith('.json'):
|
171 |
metadata = json.load(file_obj)
|
|
|
141 |
)
|
142 |
if dl_manager.is_streaming:
|
143 |
downloaded_files = dl_manager.download(all_path)
|
144 |
+
downloaded_files['train'] = [
|
145 |
+
dl_manager.iter_archive(ii) for ii in downloaded_files['train']
|
146 |
+
]
|
147 |
+
downloaded_files['test'] = [
|
148 |
+
dl_manager.iter_archive(ii) for ii in downloaded_files['test']
|
149 |
+
]
|
150 |
else:
|
151 |
downloaded_files = dl_manager.download_and_extract(all_path)
|
152 |
return [
|
|
|
169 |
def _generate_examples(self, filepaths, is_streaming):
|
170 |
if is_streaming:
|
171 |
_json, _jpg = False, False
|
172 |
+
for iter_tar in filepaths:
|
|
|
|
|
173 |
for path, file_obj in iter_tar:
|
174 |
if path.endswith('.json'):
|
175 |
metadata = json.load(file_obj)
|