-
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
Versioning of last checkpoints #12902
Conversation
Co-authored-by: Carlos Mocholí <[email protected]>
Co-authored-by: Carlos Mocholí <[email protected]>
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.
This is a storage regression. For instance, this doubles the number of checkpoint files created when used with saving at the end of every epoch and setting save_last=True. Before, we'd have N+1 checkpoints, and now we have 2N checkpoints. The old "formerly last" checkpoints are still going to be kept around on disk.
This becomes noticeable for larger models.
The only way around this is within Lightning is to extend the ModelCheckpoint callback here and override all the hooks in order to be more performant.
This should save only one last checkpoint for a full run as long as the ModelCheckpoint callback's |
What does this PR do?
Versioning of last checkpoints
Fixes #5030
Does your PR introduce any breaking changes? If yes, please list them.
The change should not be breaking if you do not rely on explicit name of the last checkpoint and use
last_model_path
instead.One existing test needed to be adjusted.
Before submitting
PR review
Anyone in the community is welcome to review the PR.
Before you start reviewing, make sure you have read the review guidelines. In short, see the following bullet-list:
Did you have fun?
Make sure you had fun coding 🙃
cc @Borda @carmocca @awaelchli @ninginthecloud @jjenniferdai @rohitgr7