-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
[Fix] Add load_url to handle incompatibility of PyTorch versions #1377
Conversation
Codecov Report
@@ Coverage Diff @@
## master #1377 +/- ##
==========================================
- Coverage 68.59% 68.59% -0.01%
==========================================
Files 164 164
Lines 10891 10896 +5
Branches 1991 1992 +1
==========================================
+ Hits 7471 7474 +3
- Misses 3030 3031 +1
- Partials 390 391 +1
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
3df6d0c
to
17aad8d
Compare
please @innerlee have a look |
Can be merged after resolving conflicts |
* [Fix] Fix torch.load error * [Fix] Fix torch.load error * rename _save to _save_ckpt * add load_url to handle imcompatibility of PyTorch versions * add unittest for load_url * fix typo * print a friendly information when error occurred
Thanks for your contribution and we appreciate it a lot. The following instructions would make your pull request more healthy and more easily get feedback. If you do not understand some items, don't worry, just make the pull request and seek help from maintainers.
Motivation
Add
load_url
to handle incompatibility of PyTorch versions.The 1.6 release of PyTorch switched
torch.save
to use a new zipfile-based file format. It will cause RuntimeError when acheckpoint was saved in
torch >= 1.6.0
but loaded intorch < 1.7.0
. Moredetails at open-mmlab/mmpose#904
Modification
Add
load_url
function.BC-breaking (Optional)
Does the modification introduce changes that break the backward-compatibility of the downstream repositories?
If so, please describe how it breaks the compatibility and how the downstream projects should modify their code to keep compatibility with this PR.
Checklist
Before PR:
After PR: