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

[DeepSpeed] fix flag forwarding in DeepSpeedPlugin #10899

Merged

Conversation

jona-0
Copy link
Contributor

@jona-0 jona-0 commented Dec 2, 2021

What does this PR do?

Forward the cpu_checkpointing and contiguous_memory_optimization flags of DeepSpeedPlugin to deepspeed correctly. Previously we were ignoring these flags.

Fixes #10874

Before starting this issue I did not realize that contiguous_memory_optimization was also not forwarded, but the unit test showed it had a similar issue as cpu_checkpointing

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

I don't think so, but could do if deepspeed sometimes has problems with these flags (not found myself and I think this should be the expected behaviour).

Before submitting

  • Was this discussed/approved via a GitHub issue? Only discussed, but opening draft PR now
  • 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?

Yes 🙃

Copy link
Contributor

@SeanNaren SeanNaren left a comment

Choose a reason for hiding this comment

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

Looks great, and appreciate the additional test!

jona-0 and others added 2 commits December 7, 2021 08:42
@mergify mergify bot added the ready PRs ready to be merged label Dec 7, 2021
@codecov
Copy link

codecov bot commented Dec 7, 2021

Codecov Report

Merging #10899 (55b2b45) into master (46f718d) will decrease coverage by 4%.
The diff coverage is n/a.

❗ Current head 55b2b45 differs from pull request most recent head cc3cf91. Consider uploading reports for the commit cc3cf91 to get more accurate results

@@           Coverage Diff            @@
##           master   #10899    +/-   ##
========================================
- Coverage      92%      88%    -4%     
========================================
  Files         177      177            
  Lines       16521    16521            
========================================
- Hits        15162    14541   -621     
- Misses       1359     1980   +621     

CHANGELOG.md Outdated Show resolved Hide resolved
Co-authored-by: ananthsub <ananth.subramaniam@gmail.com>
@SeanNaren SeanNaren enabled auto-merge (squash) December 7, 2021 20:30
@mergify mergify bot added the has conflicts label Dec 7, 2021
auto-merge was automatically disabled December 8, 2021 09:17

Head branch was pushed to by a user without write access

@mergify mergify bot removed the has conflicts label Dec 8, 2021
@awaelchli awaelchli added this to the 1.5.x milestone Dec 14, 2021
tests/plugins/test_deepspeed_plugin.py Outdated Show resolved Hide resolved
@awaelchli awaelchli enabled auto-merge (squash) December 14, 2021 15:23
@mergify mergify bot removed the has conflicts label Dec 14, 2021
@awaelchli awaelchli added the bug Something isn't working label Dec 14, 2021
@awaelchli awaelchli merged commit 7aee00c into Lightning-AI:master Dec 14, 2021
awaelchli added a commit that referenced this pull request Dec 14, 2021
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Sean Naren <sean@grid.ai>
Co-authored-by: ananthsub <ananth.subramaniam@gmail.com>
Co-authored-by: Adrian Wälchli <aedu.waelchli@gmail.com>
awaelchli added a commit that referenced this pull request Dec 14, 2021
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Sean Naren <sean@grid.ai>
Co-authored-by: ananthsub <ananth.subramaniam@gmail.com>
Co-authored-by: Adrian Wälchli <aedu.waelchli@gmail.com>
lexierule pushed a commit that referenced this pull request Dec 15, 2021
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Sean Naren <sean@grid.ai>
Co-authored-by: ananthsub <ananth.subramaniam@gmail.com>
Co-authored-by: Adrian Wälchli <aedu.waelchli@gmail.com>
@rohitgr7 rohitgr7 mentioned this pull request Feb 7, 2022
12 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working ready PRs ready to be merged strategy: deepspeed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

DeepSpeedPlugin cpu_checkpointing flag not forwarded to deepspeed correctly
5 participants