Skip to content

Flexibility to set device number < total device count #155

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

Merged
merged 6 commits into from
Jun 5, 2024

Conversation

yhl48
Copy link
Contributor

@yhl48 yhl48 commented Jun 5, 2024

Before submitting
  • Was this discussed/agreed via a Github issue? (no need for typos and docs improvements)
  • Did you read the contributor guideline, Pull Request section?
  • Did you make sure to update the docs?
  • Did you write any new necessary tests?

What does this PR do?

Fixes #152. However, this implementation is not fully correct, it will break if there is more than one node.

@yhl48 yhl48 requested review from tchaton and awaelchli as code owners June 5, 2024 07:04
@yhl48
Copy link
Contributor Author

yhl48 commented Jun 5, 2024

@tchaton is there a way to get the devices variable?

Copy link

codecov bot commented Jun 5, 2024

Codecov Report

Attention: Patch coverage is 0% with 4 lines in your changes missing coverage. Please review.

Please upload report for BASE (main@935eef5). Learn more about missing BASE report.

Additional details and impacted files
@@          Coverage Diff          @@
##             main   #155   +/-   ##
=====================================
  Coverage        ?    77%           
=====================================
  Files           ?     30           
  Lines           ?   4126           
  Branches        ?      0           
=====================================
  Hits            ?   3186           
  Misses          ?    940           
  Partials        ?      0           

@yhl48 yhl48 marked this pull request as draft June 5, 2024 07:19
@yhl48
Copy link
Contributor Author

yhl48 commented Jun 5, 2024

the problem might be more complicated than I thought, usually devices is set in the lightning Trainer class, but _DistributedEnv is called before that

@tchaton tchaton marked this pull request as ready for review June 5, 2024 09:49
@tchaton tchaton merged commit aa1c022 into Lightning-AI:main Jun 5, 2024
27 of 28 checks passed
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.

Set number of devices
3 participants