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

Re-add support for single url files in objects download #19014

Merged
merged 1 commit into from Sep 13, 2022

Conversation

sgugger
Copy link
Collaborator

@sgugger sgugger commented Sep 13, 2022

What does this PR do?

During the cache revamp done in #18438, we accidentally lost support for single urls in from_pretrained methods (something like config = AutoConfig.from_pretrained("http://my_custom_config.json"). This is not something we want to support in the long run as users should use the Hub to store their objects, but this is still a breaking change.

This PR adds support for this corner case with proper deprecation warnings. Note that such urls are not cached anymore.

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 taking care of it so quickly @sgugger

@LysandreJik
Copy link
Member

cc @alaradirik

@HuggingFaceDocBuilderDev
Copy link

HuggingFaceDocBuilderDev commented Sep 13, 2022

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

@sgugger sgugger merged commit f89f16a into main Sep 13, 2022
@sgugger sgugger deleted the allow_url_pretrained branch September 13, 2022 17:11
oneraghavan pushed a commit to oneraghavan/transformers that referenced this pull request Sep 26, 2022
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.

None yet

3 participants