Update sci_lay.py
Browse files- sci_lay.py +3 -4
sci_lay.py
CHANGED
@@ -124,11 +124,11 @@ class SciLay(datasets.GeneratorBasedBuilder):
|
|
124 |
split: _URL.format(version=self.config.version, split_name=split_name)
|
125 |
for split, split_name in _SPLIT_NAMES.items()
|
126 |
}
|
127 |
-
dl_paths =
|
128 |
-
|
129 |
paths = {
|
130 |
split: [
|
131 |
-
|
132 |
]
|
133 |
for split, split_name in _SPLIT_NAMES.items()
|
134 |
}
|
@@ -163,7 +163,6 @@ class CustomDownloadManager(datasets.DownloadManager):
|
|
163 |
super().__init__(**kwargs)
|
164 |
|
165 |
def download_and_extract(self, urls, **kwargs):
|
166 |
-
dl_paths = None
|
167 |
try:
|
168 |
dl_paths = super().download_and_extract(urls, **kwargs)
|
169 |
print(f"dl_paths are {dl_paths}")
|
|
|
124 |
split: _URL.format(version=self.config.version, split_name=split_name)
|
125 |
for split, split_name in _SPLIT_NAMES.items()
|
126 |
}
|
127 |
+
dl_paths = dl_manager.download(urls)
|
128 |
+
raise Exception(dl_paths)
|
129 |
paths = {
|
130 |
split: [
|
131 |
+
dl_manager.iter_files(os.path.join(dl_paths[split], split_name, code)) for code in self.config.journals
|
132 |
]
|
133 |
for split, split_name in _SPLIT_NAMES.items()
|
134 |
}
|
|
|
163 |
super().__init__(**kwargs)
|
164 |
|
165 |
def download_and_extract(self, urls, **kwargs):
|
|
|
166 |
try:
|
167 |
dl_paths = super().download_and_extract(urls, **kwargs)
|
168 |
print(f"dl_paths are {dl_paths}")
|