Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Align download_filename with cached_filename #33214

Merged
merged 2 commits into from
Jun 1, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion python/paddle/hapi/hub.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,9 @@ def _get_cache_or_reload(repo, force_reload, verbose=True, source='github'):

url = _git_archive_link(repo_owner, repo_name, branch, source=source)

get_path_from_url(url, hub_dir, decompress=False)
fpath = get_path_from_url(
url, hub_dir, check_exist=not force_reload, decompress=False)
shutil.move(fpath, cached_file)

with zipfile.ZipFile(cached_file) as cached_zipfile:
extraced_repo_name = cached_zipfile.infolist()[0].filename
Expand Down