-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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
Backward compatibility for checkpoint loading #1132
Conversation
Hello @amoudgl! Thanks for updating this PR. There are currently no PEP 8 issues detected in this Pull Request. Cheers! 🍻 Comment last updated at 2020-03-17 13:56:42 UTC |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it would be nice to add a test
- pls add note to changelog...
@amoudgl pls add note to changelog... then we can go :] |
@Borda I have made updates to CHANGELOG, could you please review? |
this shall be fixed in #1163 |
I see, everything is all set in this PR then? |
@amoudgl could you pls update from master? |
@Borda I have rebased the PR. |
Codecov Report
@@ Coverage Diff @@
## master #1132 +/- ##
======================================
Coverage 89% 89%
======================================
Files 62 62
Lines 3163 3163
======================================
Hits 2809 2809
Misses 354 354 |
* check if hparams_type exists in checkpoint dictionary for backward compatibility * concisely maintain backward compatibility for hparams type * Bug fix in checkpoint loading (Lightning-AI#1132)
Before submitting
What does this PR do?
It adds backward compatibility for checkpoint loading. Checkpoint loading is not backward compatible in 0.7.1. Checkpoints saved with previous pl versions (0.6 in my case) do not have
hparams_type
in checkpoint dictionary due to which hparams are not converted to namespace (L1399). Thus, pl raises error while loading model class as hparams is passed as dictionary to model class not namespace.PR review
Anyone in the community is free to review the PR once the tests have passed.
If we didn't discuss your PR in Github issues there's a high chance it will not be merged.
Did you have fun?
Make sure you had fun coding 🙃