New checkpoint saving strategy that keeps every k steps and additionally the n most recent checkpoints.#444
Open
BlueCrescent wants to merge 6 commits intomainfrom
Conversation
… additionally the n most recent checkpoints. Co-authored-by: Copilot <copilot@github.com>
Contributor
There was a problem hiding this comment.
Pull request overview
Adds a new checkpoint retention strategy to keep checkpoints at every k steps while also preserving the m most recent checkpoints, and wires it into the component registry/config/docs.
Changes:
- Implemented
KeepEveryKStepsAndMMostRecentCheckpointingStrategyand its config model. - Registered the new strategy as a configurable component.
- Added unit tests and documented the new component option.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/checkpointing/test_checkpoint_strategies.py | Adds tests and a small simulator for the new checkpoint retention strategy. |
| src/modalities/registry/components.py | Registers the new checkpoint saving strategy component and config. |
| src/modalities/config/config.py | Adds KeepEveryKStepsAndMMostRecentCheckpointingStrategyConfig. |
| src/modalities/checkpointing/checkpoint_saving_strategies.py | Implements the new “keep every k + keep last m” strategy. |
| docs/components/components.md | Documents the new checkpoint strategy component entry. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
…ecentCheckpointingStrategy.
…tingStrategy does not delete any required checkpoints. Co-authored-by: Copilot <copilot@github.com>
…k tests. Co-authored-by: Copilot <copilot@github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR do?
Adds the stragey.
General Changes
Breaking Changes
Checklist before submitting final PR
python tests/tests.py)CHANGELOG_DEV.md)