-
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
None check for filepath in ModelCheckpoint #1654
None check for filepath in ModelCheckpoint #1654
Conversation
Hello @yukw777! Thanks for updating this PR.
Comment last updated at 2020-04-29 16:08:12 UTC |
Check if the optional filepath is None before checking if it exists
I'm assuming this is OK? I thought the line length limit was 120. |
Codecov Report
@@ Coverage Diff @@
## master #1654 +/- ##
======================================
Coverage 88% 88%
======================================
Files 71 71
Lines 4175 4175
======================================
+ Hits 3691 3692 +1
+ Misses 484 483 -1 |
we set kind or warning limit 110 which is applied via pep8speaks and 120 as a hard limit in tests ( |
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.
LGTM 🦝
Do you think it's worth having a log for this case? E.g. "Model checkpoint isn't saved because file path not provided". I think it's almost worth making this a warning log, it's pretty frustrating if you train a model and then realize after a few days of training that the models weren't checkpointing. |
@tullie checkpoints are still saved if filepath is None. It just means that the user wants PL to dynamically figure out the path, which is inside the log folder under checkpoints. |
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.
@yukw777 makes sense! Thanks
Great job! =) |
Great job! =) |
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.
Good work!
Wouldn't it be better to check save_top_k != 0 instead of save_top_k > 0 because also when save_top_k == -1 checkpoints could be overwritten.
See:
olineumann@1e0844a
@Borda @awaelchli
Because it is already merged, I can create a PR if needed.
Check if the optional filepath is None before checking if it exists
Before submitting
What does this PR do?
Fixes #1535. #1535 (comment)
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 🙃