Skip to content
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

Add BaseModelCheckpoint class to inherit from #13024

Merged
merged 26 commits into from
Jun 30, 2022
Merged

Conversation

otaj
Copy link
Contributor

@otaj otaj commented May 10, 2022

What does this PR do?

Introduces BaseModelCheckpoint, empty class for custom Checkpoint callbacks, that can be subclassed and still recognized in Trainer.

This is a prerequisite for future split of ModelCheckpoint into multiple classes each doing their own thing.

Fixes #6504

Does your PR introduce any breaking changes? If yes, please list them.

Before submitting

  • Was this discussed/approved via a GitHub issue? (not for typos and docs)
  • Did you read the contributor guideline, Pull Request section?
  • Did you make sure your PR does only one thing, instead of bundling different changes together?
  • Did you make sure to update the documentation with your changes? (if necessary)
  • [n/a] Did you write any new necessary tests? (not for typos and docs)
  • Did you verify new and existing tests pass locally with your changes?
  • Did you list all the breaking changes introduced by this pull request?
  • Did you update the CHANGELOG? (not for typos, docs, test updates, or minor internal changes/refactors)

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:

  • Is this pull request ready for review? (if not, please submit in draft mode)
  • Check that all items from Before submitting are resolved
  • Make sure the title is self-explanatory and the description concisely explains the PR
  • Add labels and milestones (and optionally projects) to the PR so it can be classified

Did you have fun?

Make sure you had fun coding 🙃

cc @Borda @awaelchli @ananthsub @ninginthecloud @rohitgr7 @otaj @carmocca @jjenniferdai

@otaj otaj added feature Is an improvement or enhancement checkpointing Related to checkpointing callback: model checkpoint labels May 10, 2022
@otaj otaj added this to the 1.6.x milestone May 10, 2022
@otaj otaj requested a review from williamFalcon as a code owner May 10, 2022 10:03
@otaj otaj self-assigned this May 10, 2022
@otaj otaj requested a review from edenlightning as a code owner May 11, 2022 07:25
@mergify mergify bot added the ready PRs ready to be merged label May 12, 2022
pytorch_lightning/callbacks/model_checkpoint.py Outdated Show resolved Hide resolved
docs/source/common/checkpointing_expert.rst Outdated Show resolved Hide resolved
pytorch_lightning/callbacks/model_checkpoint.py Outdated Show resolved Hide resolved
@mergify mergify bot added has conflicts and removed ready PRs ready to be merged labels May 19, 2022
@otaj otaj requested a review from ananthsub June 22, 2022 17:15
src/lightning_app/cli/pl-app-template/core/callbacks.py Outdated Show resolved Hide resolved
src/pytorch_lightning/callbacks/checkpoint.py Outdated Show resolved Hide resolved
src/pytorch_lightning/callbacks/checkpoint.py Outdated Show resolved Hide resolved
src/pytorch_lightning/loggers/wandb.py Show resolved Hide resolved
src/pytorch_lightning/trainer/trainer.py Outdated Show resolved Hide resolved
src/pytorch_lightning/trainer/trainer.py Outdated Show resolved Hide resolved
@mergify mergify bot added has conflicts and removed ready PRs ready to be merged labels Jun 24, 2022
@mergify mergify bot added ready PRs ready to be merged has conflicts and removed has conflicts ready PRs ready to be merged labels Jun 27, 2022
@mergify mergify bot added ready PRs ready to be merged and removed has conflicts ready PRs ready to be merged labels Jun 27, 2022
@otaj otaj enabled auto-merge (squash) June 30, 2022 09:06
@otaj otaj merged commit 663d4c9 into master Jun 30, 2022
@otaj otaj deleted the feature/base_model_checkpoint branch June 30, 2022 10:07
jerome-habana pushed a commit to jerome-habana/lightning that referenced this pull request Jul 14, 2022
Co-authored-by: Adrian Wälchli <aedu.waelchli@gmail.com>
Co-authored-by: ananthsub <ananth.subramaniam@gmail.com>
Co-authored-by: Jirka <jirka.borovec@seznam.cz>
Co-authored-by: Carlos Mocholí <carlossmocholi@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
callback: model checkpoint checkpointing Related to checkpointing feature Is an improvement or enhancement ready PRs ready to be merged
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[RFC] Create a ModelCheckpointBase callback
7 participants