-
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
Added strict=False for load_from_checkpoint #2819
Conversation
Codecov Report
@@ Coverage Diff @@
## master #2819 +/- ##
======================================
Coverage 90% 90%
======================================
Files 81 81
Lines 7553 7553
======================================
+ Hits 6796 6797 +1
+ Misses 757 756 -1 |
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.
pls rebase on master and do not add removed/deprecated API
@shijianjian can you add a test for this? |
Hello @shijianjian! Thanks for updating this PR. There are currently no PEP 8 issues detected in this Pull Request. Cheers! 🍻 Comment last updated at 2020-08-13 19:51:47 UTC |
Do I understand correctly, this PR also adds unrelated to strict kwarg the possibility to have hparams_file a dict? Why do we need that? Isn't it the same as passing the dict as kwargs? |
@awaelchli The only reason that I included that is because of the hparams modification by |
Not sure why we override the on_gpu=False, I guess it is assumed we always load the checkpoint to CPU, which is probably not necessary. But I think that requires a different solution. The reason why I am not so convinced with the hprams file as a dict is:
|
@awaelchli I have no objections to remove it since it is only used for my own project, as long as you confirmed that the I will remove the corresponding code soon. Thank you. |
Should be able to be merged. |
This pull request is now in conflict... :( |
Co-authored-by: Justus Schock <[email protected]>
Co-authored-by: Rohit Gupta <[email protected]>
Co-authored-by: Rohit Gupta <[email protected]>
still, some pep8 issues are there. |
* Added strict=False and hparams_file accepcts dict * Apply suggestions from code review Co-authored-by: Justus Schock <[email protected]> * Type check fix * Added tests * Linting & test fix * Removed redundant code & test * Added strict=False and hparams_file accepcts dict * Apply suggestions from code review Co-authored-by: Justus Schock <[email protected]> * Type check fix * Added tests * Linting & test fix * Removed redundant code & test * Apply suggestions from code review * tests * tests * chlog * Update tests/models/test_restore.py Co-authored-by: Rohit Gupta <[email protected]> * update test comments * Added docstring for the strict attribute * Added supplementary tests * Update saving.py * Apply suggestions from code review Co-authored-by: Rohit Gupta <[email protected]> * pep8, removed extra func Co-authored-by: Jirka Borovec <[email protected]> Co-authored-by: Justus Schock <[email protected]> Co-authored-by: Jirka Borovec <[email protected]> Co-authored-by: Rohit Gupta <[email protected]> Co-authored-by: Adrian Wälchli <[email protected]> Co-authored-by: ananyahjha93 <[email protected]>
What does this PR do?
Enabled functionality as
Fixes #2629
Before submitting
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 🙃