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 try_to_load_from_cache with huggingface_hub #18966

Merged
merged 2 commits into from
Sep 12, 2022
Merged

Conversation

sgugger
Copy link
Collaborator

@sgugger sgugger commented Sep 9, 2022

What does this PR do?

This PR completely align try_to_load_from_cache with its huggingface_hub counterpart (it's a copy-paste while just removing the repo_type argument) and adapts its use in cached_file. This is done before the next release of Transformers so that there is no breaking change if users start to adopt it (since the arguments are in a different order), and to make the transition (which will happen after the next release of huggingface_hub) easier.

@HuggingFaceDocBuilderDev
Copy link

HuggingFaceDocBuilderDev commented Sep 9, 2022

The documentation is not available anymore as the PR was closed or merged.

Copy link
Contributor

@Wauplin Wauplin left a comment

Choose a reason for hiding this comment

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

Looks good to me.

I just realized we should add a repo_type argument to the method as for now it's really focused on model-only.

@sgugger
Copy link
Collaborator Author

sgugger commented Sep 12, 2022

There is one on the HF hub side ;-) I just removed it here since it does not concern Transformers and we only the default value.

@Wauplin
Copy link
Contributor

Wauplin commented Sep 12, 2022

Perfect :)

Copy link
Member

@LysandreJik LysandreJik left a comment

Choose a reason for hiding this comment

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

Thanks for streamlining the two!

@sgugger sgugger merged commit f7ceda3 into main Sep 12, 2022
@sgugger sgugger deleted the align_load_from_cache branch September 12, 2022 16:09
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.

4 participants