mirror of
https://github.com/clearml/clearml
synced 2025-06-23 01:55:38 +00:00
Fix dataset download (#713)
This commit is contained in:
parent
8aaa8e7897
commit
6b56b3cfa2
@ -2121,6 +2121,9 @@ class Dataset(object):
|
|||||||
extract_archive=False, name=self._id)
|
extract_archive=False, name=self._id)
|
||||||
if not local_zip:
|
if not local_zip:
|
||||||
raise ValueError("Could not download dataset id={} entry={}".format(self._id, data_artifact_name))
|
raise ValueError("Could not download dataset id={} entry={}".format(self._id, data_artifact_name))
|
||||||
|
return local_zip
|
||||||
|
|
||||||
|
def _extract_part(local_zip):
|
||||||
# noinspection PyProtectedMember
|
# noinspection PyProtectedMember
|
||||||
StorageManager._extract_to_cache(
|
StorageManager._extract_to_cache(
|
||||||
cached_file=local_zip, name=self._id,
|
cached_file=local_zip, name=self._id,
|
||||||
@ -2133,7 +2136,8 @@ class Dataset(object):
|
|||||||
|
|
||||||
with ThreadPoolExecutor(max_workers=max_workers) as pool:
|
with ThreadPoolExecutor(max_workers=max_workers) as pool:
|
||||||
for d in data_artifact_entries:
|
for d in data_artifact_entries:
|
||||||
pool.submit(_download_part, d)
|
local_zip = _download_part(d)
|
||||||
|
pool.submit(_extract_part, local_zip)
|
||||||
|
|
||||||
return local_folder
|
return local_folder
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user