-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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
load checkpoint from URL #1532
Comments
I recently had to implement a similar functionality and I found this library very useful: https://github.com/RaRe-Technologies/smart_open. It handles various protocols other than http(s) like s3 with a very simple interface like python’s default file open. Thought you might be interested. |
slight preference for option 1 |
@yukw777 nice. want to submit a PR? Maybe we do a v1 that supports http, https only? |
@williamFalcon yeah i can give it a shot. I just read the code of load_state_dict_from_url and it seems like we don't really need to use A few questions:
|
Maybe we'll also use torch cache for that? Since after all it's still a PyTorch model? Or do we want to create yet another cache? |
Let's enable loading weights from a URL directly
Option 1:
Automate it with our current API
Option 2:
Have a separate method
Resources
We can use this under the hood:
(https://pytorch.org/docs/stable/hub.html#torch.hub.load_state_dict_from_url)
Any thoughts on which one is better?
@PyTorchLightning/core-contributors
The text was updated successfully, but these errors were encountered: