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

HF Hub download #137

Merged
merged 2 commits into from
Jun 22, 2021
Merged

HF Hub download #137

merged 2 commits into from
Jun 22, 2021

Conversation

LysandreJik
Copy link
Member

Offer an additional method hf_hub_download to bypass the call of hf_hub_url followed by cached_download

Copy link
Contributor

@osanseviero osanseviero left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is great and very useful! Thanks!

Copy link
Member

@julien-c julien-c left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

is the method name the "right" one? I feel like it works, but was wondering if maybe the more explicit cached_download_from_hf_hub was more explicit

Thoughts?

src/huggingface_hub/file_download.py Outdated Show resolved Hide resolved
Co-authored-by: Julien Chaumond <chaumond@gmail.com>
@LysandreJik
Copy link
Member Author

I feel like hf_hub_download is really the better name here

I feel like it works, but was wondering if maybe the more explicit cached_download_from_hf_hub was more explicit

It is indeed more explicit but I feel that it's a mouthful to say the same thing.

We don't mention cache everywhere in downloading methods (snapshot_download, from_pretrained etc) and yet I think everyone knows it's cached.

@julien-c
Copy link
Member

sounds good :)

@LysandreJik LysandreJik merged commit cc91e1d into huggingface:main Jun 22, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants