-
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
change default save_top_k, save_last to None #3680
Conversation
Hello @awaelchli! Thanks for updating this PR.
Comment last updated at 2020-09-27 23:11:12 UTC |
Codecov Report
@@ Coverage Diff @@
## master #3680 +/- ##
======================================
- Coverage 86% 86% -0%
======================================
Files 110 110
Lines 8112 8059 -53
======================================
- Hits 6957 6898 -59
- Misses 1155 1161 +6 |
assert checkpoint_callback.best_k_models == {} | ||
assert checkpoint_callback.kth_best_model_path == '' | ||
# check that no ckpts were created | ||
assert len(set(os.listdir(tmpdir))) == 0 |
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.
we don't need the set here, extra from the copy/paste
LGTM |
nice job @awaelchli ! |
What does this PR do?
We broke save_top_k when monitor default was switched to None.
save_top_k only makes sense when we have a metric to monitor.
The only exception is when save_top_k=-1, we want to save all checkpoints of all epochs. This PR re-enables it!
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 🙃