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

Enable DDP Plugin to pass through args to LightningDistributedDataParallel #4382

Merged
merged 9 commits into from
Oct 27, 2020

Conversation

ananthsub
Copy link
Contributor

What does this PR do?

This makes the DDP Plugin more generic, so people don't have to subclass if they only want to change what goes into the DistributedDataParallel constructor. This preserves find_unused_parameters=True as the default.

Related: is find_unused_parameters forced to be True since Lightning wraps the whole LightningModule in LightningDistributedDataParallel ?

cc @williamFalcon

Before submitting

  • Was this discussed/approved via a Github issue? (no need for typos and docs improvements)
  • 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? Otherwise, we ask you to create a separate PR for every change.
  • Did you make sure to update the documentation with your changes?
  • Did you write any new necessary tests?
  • Did you verify new and existing tests pass locally with your changes?
  • If you made a notable change (that affects users), did you update the CHANGELOG?

PR review

  • Is this pull request ready for review? (if not, please submit in draft mode)

Anyone in the community is free to review the PR once the tests have passed.
If we didn't discuss your PR in Github issues there's a high chance it will not be merged.

Did you have fun?

Make sure you had fun coding 🙃

@codecov
Copy link

codecov bot commented Oct 26, 2020

Codecov Report

Merging #4382 into master will increase coverage by 0%.
The diff coverage is 100%.

@@          Coverage Diff           @@
##           master   #4382   +/-   ##
======================================
  Coverage      93%     93%           
======================================
  Files         111     111           
  Lines        8135    8099   -36     
======================================
- Hits         7526    7509   -17     
+ Misses        609     590   -19     

pytorch_lightning/plugins/ddp_plugin.py Outdated Show resolved Hide resolved
@mergify mergify bot requested a review from a team October 27, 2020 01:35
pytorch_lightning/plugins/ddp_plugin.py Outdated Show resolved Hide resolved
pytorch_lightning/plugins/ddp_plugin.py Outdated Show resolved Hide resolved
@ydcjeff ydcjeff added this to the 1.0.x milestone Oct 27, 2020
@ydcjeff ydcjeff added the feature Is an improvement or enhancement label Oct 27, 2020
@mergify mergify bot requested a review from a team October 27, 2020 07:12
@awaelchli awaelchli added the distributed Generic distributed-related topic label Oct 27, 2020
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.

Awesome addition !

pytorch_lightning/plugins/ddp_plugin.py Outdated Show resolved Hide resolved
@SeanNaren SeanNaren merged commit 6878f3b into Lightning-AI:master Oct 27, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
distributed Generic distributed-related topic feature Is an improvement or enhancement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants