This commit is contained in:
mulin.lyh
2024-07-26 16:34:47 +08:00
parent abacad997a
commit 33bdd0d215

View File

@@ -255,6 +255,7 @@ def _snapshot_download(
cookies=cookies,
ignore_file_pattern=ignore_file_pattern,
allow_file_pattern=allow_file_pattern)
elif repo_type == REPO_TYPE_DATASET:
group_or_owner, name = model_id_to_group_owner_name(repo_id)
if not revision:
@@ -299,6 +300,9 @@ def _snapshot_download(
break
page_number += 1
cache.save_model_version(revision_info=revision_detail)
return os.path.join(cache.get_root_location())
def _download_file_lists(
repo_files: List[str],
@@ -372,6 +376,3 @@ def _download_file_lists(
download_file(url, repo_file, temporary_cache_dir, cache, headers,
cookies)
cache.save_model_version(revision_info=revision_detail)
return os.path.join(cache.get_root_location())