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 property to skip restoring optimizers and schedulers via plugin (DeepSpeed Checkpointing Fix 2/n) #8644

Merged
merged 1 commit into from
Jul 31, 2021

Conversation

SeanNaren
Copy link
Contributor

@SeanNaren SeanNaren commented Jul 30, 2021

What does this PR do?

Related to #8397

This PR adds a new property to skip optimizer/schedulers loading via the checkpoint connector, which for DeepSpeed is managed by the engine itself. The alternative was to move the loading logic into the plugin however this breaks the responsibility a bit for all other plugins that do not need this additional logic to be moved into the training type plugin.

Eventually, I'd like to see the actual loading logic end up inside the CheckpointPlugin, as described in #8118 to give the plugin a bit more control in the future.

CHANGELOG to be added in #8397

cc @awaelchli @tchaton

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)
  • 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 internal minor changes/refactorings)

PR review

Anyone in the community is welcome to review the PR.
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

Did you have fun?

Make sure you had fun coding 🙃

@SeanNaren SeanNaren added the feature Is an improvement or enhancement label Jul 30, 2021
@SeanNaren SeanNaren added this to the v1.5 milestone Jul 30, 2021
@SeanNaren SeanNaren self-assigned this Jul 30, 2021
@pep8speaks
Copy link

Hello @SeanNaren! Thanks for opening this PR. We checked the lines you've touched for PEP 8 issues, and found:

Line 226:13: W503 line break before binary operator

@codecov
Copy link

codecov bot commented Jul 30, 2021

Codecov Report

Merging #8644 (16e64f6) into master (bb48873) will increase coverage by 0%.
The diff coverage is 100%.

@@          Coverage Diff           @@
##           master   #8644   +/-   ##
======================================
  Coverage      88%     88%           
======================================
  Files         168     168           
  Lines       13972   13975    +3     
======================================
+ Hits        12336   12340    +4     
+ Misses       1636    1635    -1     

Copy link
Contributor

@kaushikb11 kaushikb11 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 added the ready PRs ready to be merged label Jul 30, 2021
@SeanNaren SeanNaren enabled auto-merge (squash) July 30, 2021 14:59
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 !

@SeanNaren SeanNaren merged commit 7a1e972 into master Jul 31, 2021
@SeanNaren SeanNaren deleted the fix/deepspeed_checkpointing_2n branch July 31, 2021 08:08
leezu pushed a commit to leezu/pytorch-lightning that referenced this pull request Sep 30, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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.

5 participants