Skip to content

Conversation

jbloxham
Copy link
Contributor

@jbloxham jbloxham commented Jan 31, 2022

The distributed process group doesn't necessarily need to be initialized when we're doing single-process training, and this can help avoid crashes in certain environments. Note that the DDP initialization code already is a no-op when the distributed process group is not initialized.

Tested by running models with various world sizes (and no explicit world size), and using a print statement to verify whether the model was the original model class or a DDP wrapper.

@jbloxham jbloxham linked an issue Jan 31, 2022 that may be closed by this pull request
Copy link
Contributor

@ravi-mosaicml ravi-mosaicml left a comment

Choose a reason for hiding this comment

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

LGTM

@jbloxham jbloxham marked this pull request as ready for review January 31, 2022 22:31
@jbloxham jbloxham merged commit 00fbf95 into mosaicml:dev Jan 31, 2022
A-Jacobson pushed a commit that referenced this pull request Feb 10, 2022
* cleanup dist init

* specify node rank

* rewrite _get_distributed_config_var for better error handling

* change a warning to an error

* woops

* dummy commit to trigger jenkins

* Update composer/utils/dist.py

Co-authored-by: ravi-mosaicml <[email protected]>

* woops

* remove print statement

Co-authored-by: ravi-mosaicml <[email protected]>
coryMosaicML pushed a commit to coryMosaicML/composer that referenced this pull request Feb 23, 2022
* cleanup dist init

* specify node rank

* rewrite _get_distributed_config_var for better error handling

* change a warning to an error

* woops

* dummy commit to trigger jenkins

* Update composer/utils/dist.py

Co-authored-by: ravi-mosaicml <[email protected]>

* woops

* remove print statement

Co-authored-by: ravi-mosaicml <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Do not run DDP for users that are running on a single GPU`
2 participants