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 strategy="auto" support on the 1.9.x branch #16916

Merged
merged 5 commits into from
Mar 1, 2023

Conversation

carmocca
Copy link
Contributor

@carmocca carmocca commented Mar 1, 2023

What does this PR do?

This adds support for passing strategy="auto" to Fabric or Trainer. This is essentially the same as the previous strategy=None behavior, but will favor ddp over ddp_spawn when possible. strategy=None is still the default.

cc @Borda @tchaton @carmocca @justusschock @awaelchli

@carmocca carmocca added bug Something isn't working priority: 0 High priority task labels Mar 1, 2023
@carmocca carmocca added this to the v1.9.x milestone Mar 1, 2023
@carmocca carmocca requested a review from awaelchli as a code owner March 1, 2023 12:32
@carmocca carmocca self-assigned this Mar 1, 2023
@github-actions github-actions bot added fabric lightning.fabric.Fabric pl Generic label for PyTorch Lightning package labels Mar 1, 2023
@github-actions
Copy link
Contributor

github-actions bot commented Mar 1, 2023

⛈️ Required checks status: Has failure 🔴

Warning
This job will need to be re-run to merge your PR. If you do not have write access to the repository, you can ask Lightning-AI/lai-frameworks to re-run it. If you push a new commit, all of CI will re-trigger.

Groups summary

🔴 pytorch_lightning: Tests workflow
Check ID Status
pl-cpu (macOS-11, pytorch, 3.8, 1.11) failure
pl-cpu (macOS-11, pytorch, 3.9, 1.12) failure
pl-cpu (macOS-11, pytorch, 3.10, 1.13) failure
pl-cpu (macOS-11, pytorch, 3.8, 1.10, oldest) failure
pl-cpu (ubuntu-20.04, pytorch, 3.8, 1.10) success
pl-cpu (ubuntu-20.04, pytorch, 3.9, 1.11) success
pl-cpu (ubuntu-20.04, pytorch, 3.10, 1.12) success
pl-cpu (ubuntu-20.04, pytorch, 3.10, 1.13) success
pl-cpu (ubuntu-20.04, pytorch, 3.7, 1.10, oldest) success
pl-cpu (windows-2022, pytorch, 3.9, 1.11) success
pl-cpu (windows-2022, pytorch, 3.10, 1.12) success
pl-cpu (windows-2022, pytorch, 3.10, 1.13) success
pl-cpu (windows-2022, pytorch, 3.7, 1.10, oldest) success
pl-cpu (slow, macOS-11, pytorch, 3.7, 1.11) failure
pl-cpu (slow, ubuntu-20.04, pytorch, 3.7, 1.11) success
pl-cpu (slow, windows-2022, pytorch, 3.7, 1.11) success
pl-cpu (macOS-11, lightning, 3.8, 1.13) failure
pl-cpu (ubuntu-20.04, lightning, 3.8, 1.13) success
pl-cpu (windows-2022, lightning, 3.8, 1.13) success

These checks are required after the changes to src/lightning_fabric/connector.py, src/pytorch_lightning/trainer/connectors/accelerator_connector.py, tests/tests_pytorch/trainer/connectors/test_accelerator_connector.py.

🟢 pytorch_lightning: Azure GPU
Check ID Status
pytorch-lightning (GPUs) success

These checks are required after the changes to src/pytorch_lightning/trainer/connectors/accelerator_connector.py, tests/tests_pytorch/trainer/connectors/test_accelerator_connector.py, src/lightning_fabric/connector.py.

🟢 pytorch_lightning: Azure HPU
Check ID Status
pytorch-lightning (HPUs) success

These checks are required after the changes to src/lightning_fabric/connector.py, src/pytorch_lightning/trainer/connectors/accelerator_connector.py, tests/tests_pytorch/trainer/connectors/test_accelerator_connector.py.

🟡 pytorch_lightning: Azure IPU
Check ID Status
pytorch-lightning (IPUs) queued

These checks are required after the changes to src/lightning_fabric/connector.py, src/pytorch_lightning/trainer/connectors/accelerator_connector.py, tests/tests_pytorch/trainer/connectors/test_accelerator_connector.py.

🟢 pytorch_lightning: Docs
Check ID Status
make-doctest (pytorch) success
make-html (pytorch) success

These checks are required after the changes to src/pytorch_lightning/trainer/connectors/accelerator_connector.py.

🟢 lightning_fabric: CPU workflow
Check ID Status
fabric-cpu (macOS-11, fabric, 3.8, 1.11) success
fabric-cpu (macOS-11, fabric, 3.9, 1.12) success
fabric-cpu (macOS-11, fabric, 3.10, 1.13) success
fabric-cpu (macOS-11, fabric, 3.7, 1.10, oldest) success
fabric-cpu (ubuntu-20.04, fabric, 3.8, 1.10) success
fabric-cpu (ubuntu-20.04, fabric, 3.9, 1.11) success
fabric-cpu (ubuntu-20.04, fabric, 3.10, 1.12) success
fabric-cpu (ubuntu-20.04, fabric, 3.10, 1.13) success
fabric-cpu (ubuntu-20.04, fabric, 3.7, 1.10, oldest) success
fabric-cpu (windows-2022, fabric, 3.9, 1.11) success
fabric-cpu (windows-2022, fabric, 3.10, 1.12) success
fabric-cpu (windows-2022, fabric, 3.10, 1.13) success
fabric-cpu (windows-2022, fabric, 3.7, 1.10, oldest) success
fabric-cpu (macOS-11, lightning, 3.8, 1.13) success
fabric-cpu (ubuntu-20.04, lightning, 3.8, 1.13) success
fabric-cpu (windows-2022, lightning, 3.8, 1.13) success

These checks are required after the changes to src/lightning_fabric/connector.py, tests/tests_fabric/test_connector.py.

🟢 lightning_fabric: Azure GPU
Check ID Status
lightning-fabric (GPUs) success

These checks are required after the changes to src/lightning_fabric/connector.py, tests/tests_fabric/test_connector.py.

🟢 mypy
Check ID Status
mypy success

These checks are required after the changes to src/lightning_fabric/connector.py, src/pytorch_lightning/trainer/connectors/accelerator_connector.py.

🟢 install
Check ID Status
install-pkg (ubuntu-22.04, app, 3.7) success
install-pkg (ubuntu-22.04, app, 3.10) success
install-pkg (ubuntu-22.04, fabric, 3.7) success
install-pkg (ubuntu-22.04, fabric, 3.10) success
install-pkg (ubuntu-22.04, pytorch, 3.7) success
install-pkg (ubuntu-22.04, pytorch, 3.10) success
install-pkg (ubuntu-22.04, lightning, 3.7) success
install-pkg (ubuntu-22.04, lightning, 3.10) success
install-pkg (ubuntu-22.04, notset, 3.7) success
install-pkg (ubuntu-22.04, notset, 3.10) success
install-pkg (macOS-12, app, 3.7) success
install-pkg (macOS-12, app, 3.10) success
install-pkg (macOS-12, fabric, 3.7) success
install-pkg (macOS-12, fabric, 3.10) success
install-pkg (macOS-12, pytorch, 3.7) success
install-pkg (macOS-12, pytorch, 3.10) success
install-pkg (macOS-12, lightning, 3.7) success
install-pkg (macOS-12, lightning, 3.10) success
install-pkg (macOS-12, notset, 3.7) success
install-pkg (macOS-12, notset, 3.10) success
install-pkg (windows-2022, app, 3.7) success
install-pkg (windows-2022, app, 3.10) success
install-pkg (windows-2022, fabric, 3.7) success
install-pkg (windows-2022, fabric, 3.10) success
install-pkg (windows-2022, pytorch, 3.7) success
install-pkg (windows-2022, pytorch, 3.10) success
install-pkg (windows-2022, lightning, 3.7) success
install-pkg (windows-2022, lightning, 3.10) success
install-pkg (windows-2022, notset, 3.7) success
install-pkg (windows-2022, notset, 3.10) success

These checks are required after the changes to src/lightning_fabric/connector.py, src/pytorch_lightning/trainer/connectors/accelerator_connector.py.

🔴 link-check
Check ID Status
markdown-link-check failure

These checks are required after the changes to src/lightning_app/CHANGELOG.md, src/lightning_fabric/CHANGELOG.md, src/pytorch_lightning/CHANGELOG.md.


Thank you for your contribution! 💜

Note
This comment is automatically generated and updates for 60 minutes every 180 seconds. If you have any other questions, contact carmocca for help.

@codecov
Copy link

codecov bot commented Mar 1, 2023

Codecov Report

Merging #16916 (39bdcfc) into release/stable (1091484) will decrease coverage by 20%.
The diff coverage is 100%.

❗ Current head 39bdcfc differs from pull request most recent head c02898e. Consider uploading reports for the commit c02898e to get more accurate results

Additional details and impacted files
@@                Coverage Diff                @@
##           release/stable   #16916     +/-   ##
=================================================
- Coverage              82%      62%    -20%     
=================================================
  Files                 474      435     -39     
  Lines               35160    34979    -181     
=================================================
- Hits                28685    21654   -7031     
- Misses               6475    13325   +6850     

@awaelchli awaelchli changed the title Fix strategy="auto" support on the 1.9.x branch Add strategy="auto" support on the 1.9.x branch Mar 1, 2023
@carmocca carmocca force-pushed the hotfix/auto-support branch from 3569d5e to c02898e Compare March 1, 2023 13:38
@mergify mergify bot added the ready PRs ready to be merged label Mar 1, 2023
@github-actions github-actions bot added the app (removed) Generic label for Lightning App package label Mar 1, 2023
@lantiga lantiga merged commit 3bee819 into release/stable Mar 1, 2023
@lantiga lantiga deleted the hotfix/auto-support branch March 1, 2023 13:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
app (removed) Generic label for Lightning App package bug Something isn't working fabric lightning.fabric.Fabric pl Generic label for PyTorch Lightning package priority: 0 High priority task ready PRs ready to be merged
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants