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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Force ModelCheckpoint callback to run last #5731

Merged
merged 13 commits into from Feb 3, 2021

Conversation

awaelchli
Copy link
Member

@awaelchli awaelchli commented Feb 1, 2021

What does this PR do?

Force ModelCheckpoint callbacks to run last, ensuring that all states get saved to the checkpoint.

The test that I added fail if we remove the changes in the callback connector.
This change only affects usecases where the user provides their own callback list.
The automated default ModelCheckpoint was already running last before this PR.

PR #5615 will make use of this helper function and add more tests to ensure the same applies to the model checkpoints defined by configure_callbacks.

Before submitting

  • Was this discussed/approved via a GitHub issue? (not for typos and docs) discussed with @ananthsub
  • 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)
  • 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 update the CHANGELOG? (not for typos, docs, test updates, or internal minor changes/refactorings)

PR review

Anyone in the community is free to review the PR once the tests have passed.
Before you start reviewing make sure you have read 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
  • Check that target branch and milestone match!

Did you have fun?

Make sure you had fun coding 馃檭

@awaelchli awaelchli added feature Is an improvement or enhancement checkpointing Related to checkpointing callback labels Feb 1, 2021
@awaelchli awaelchli added this to the 1.2 milestone Feb 1, 2021
Copy link
Contributor

@ananthsub ananthsub left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for sending this out so quickly @awaelchli ! Any reason this is blocked on #5621? Can this go in first and then be refactored by #5621?

@codecov
Copy link

codecov bot commented Feb 1, 2021

Codecov Report

Merging #5731 (bc11711) into release/1.2-dev (aba2123) will decrease coverage by 0%.
The diff coverage is 100%.

@@               Coverage Diff                @@
##           release/1.2-dev   #5731    +/-   ##
================================================
- Coverage               88%     88%    -0%     
================================================
  Files                  181     181            
  Lines                12890   12747   -143     
================================================
- Hits                 11339   11195   -144     
- Misses                1551    1552     +1     

@pep8speaks
Copy link

pep8speaks commented Feb 1, 2021

Hello @awaelchli! Thanks for updating this PR.

There are currently no PEP 8 issues detected in this Pull Request. Cheers! 馃嵒

Comment last updated at 2021-02-03 14:38:18 UTC

@awaelchli awaelchli changed the base branch from feature/configure_callbacks to release/1.2-dev February 1, 2021 06:40
@awaelchli awaelchli changed the title [blocked by #5621] Force ModelCheckpoint callback to run last [skip ci] Force ModelCheckpoint callback to run last [skip ci] Feb 1, 2021
@awaelchli
Copy link
Member Author

@ananthsub No particular reason, just a matter of rebasing. I changed it now

@awaelchli awaelchli changed the title Force ModelCheckpoint callback to run last [skip ci] Force ModelCheckpoint callback to run last Feb 1, 2021
@mergify mergify bot added the has conflicts label Feb 1, 2021
Copy link
Contributor

@tchaton tchaton left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM !

@mergify mergify bot removed the has conflicts label Feb 3, 2021
@awaelchli awaelchli enabled auto-merge (squash) February 3, 2021 14:42
@awaelchli awaelchli added the ready PRs ready to be merged label Feb 3, 2021
@awaelchli awaelchli merged commit 9555043 into release/1.2-dev Feb 3, 2021
@awaelchli awaelchli deleted the feature/tail-ckpt2 branch February 3, 2021 21:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
callback 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.

None yet

6 participants