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

Fix torch-numpy compatibility conflict in tests #20004

Merged
merged 8 commits into from
Jun 22, 2024

Conversation

awaelchli
Copy link
Member

@awaelchli awaelchli commented Jun 21, 2024

What does this PR do?

PyTorch distributed (an potentially other modules) are not yet compatible with NumPy > 2.0. This PR skips tests that run with incompatible versions. Note, this will only affect tests run on master where numpy is unpinned.


📚 Documentation preview 📚: https://pytorch-lightning--20004.org.readthedocs.build/en/20004/

cc @carmocca @justusschock @awaelchli @Borda

@github-actions github-actions bot added the fabric lightning.fabric.Fabric label Jun 21, 2024
@awaelchli awaelchli changed the title Skip tests that have torch-numpy compatibility conflict [WIP] Skip tests that have torch-numpy compatibility conflict Jun 21, 2024
@github-actions github-actions bot added pl Generic label for PyTorch Lightning package dependencies Pull requests that update a dependency file labels Jun 21, 2024
@awaelchli awaelchli marked this pull request as ready for review June 21, 2024 17:32
Copy link
Contributor

github-actions bot commented Jun 21, 2024

⚡ Required checks status: All passing 🟢

Groups summary

🟢 pytorch_lightning: Tests workflow
Check ID Status
pl-cpu (macOS-11, lightning, 3.8, 2.0, oldest) success
pl-cpu (macOS-11, lightning, 3.10, 2.0) success
pl-cpu (macOS-11, lightning, 3.10, 2.1) success
pl-cpu (macOS-11, lightning, 3.10, 2.2) success
pl-cpu (macOS-14, lightning, 3.10, 2.3) success
pl-cpu (ubuntu-20.04, lightning, 3.8, 2.0, oldest) success
pl-cpu (ubuntu-20.04, lightning, 3.10, 2.0) success
pl-cpu (ubuntu-20.04, lightning, 3.10, 2.1) success
pl-cpu (ubuntu-20.04, lightning, 3.10, 2.2) success
pl-cpu (ubuntu-20.04, lightning, 3.10, 2.3) success
pl-cpu (windows-2022, lightning, 3.8, 2.0, oldest) success
pl-cpu (windows-2022, lightning, 3.10, 2.0) success
pl-cpu (windows-2022, lightning, 3.10, 2.1) success
pl-cpu (windows-2022, lightning, 3.10, 2.2) success
pl-cpu (windows-2022, lightning, 3.10, 2.3) success
pl-cpu (macOS-11, pytorch, 3.8, 2.0) success
pl-cpu (ubuntu-20.04, pytorch, 3.8, 2.0) success
pl-cpu (windows-2022, pytorch, 3.8, 2.0) success
pl-cpu (macOS-12, pytorch, 3.11, 2.0) success
pl-cpu (macOS-12, pytorch, 3.11, 2.1) success
pl-cpu (ubuntu-22.04, pytorch, 3.11, 2.0) success
pl-cpu (ubuntu-22.04, pytorch, 3.11, 2.1) success
pl-cpu (windows-2022, pytorch, 3.11, 2.0) success
pl-cpu (windows-2022, pytorch, 3.11, 2.1) success

These checks are required after the changes to requirements/fabric/base.txt, src/lightning/fabric/utilities/testing/_runif.py, requirements/pytorch/base.txt.

🟢 pytorch_lightning: Azure GPU
Check ID Status
pytorch-lightning (GPUs) (testing Lightning | latest) success
pytorch-lightning (GPUs) (testing PyTorch | latest) success

These checks are required after the changes to requirements/pytorch/base.txt, requirements/fabric/base.txt, src/lightning/fabric/utilities/testing/_runif.py.

🟢 pytorch_lightning: Benchmarks
Check ID Status
lightning.Benchmarks success

These checks are required after the changes to requirements/fabric/base.txt, requirements/pytorch/base.txt, src/lightning/fabric/utilities/testing/_runif.py.

🟢 fabric: Docs
Check ID Status
docs-make (fabric, doctest) success
docs-make (fabric, html) success

These checks are required after the changes to src/lightning/fabric/utilities/testing/_runif.py, requirements/fabric/base.txt.

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

These checks are required after the changes to requirements/pytorch/base.txt.

🟢 pytorch_lightning: Docker
Check ID Status
build-cuda (3.10, 2.0, 11.8.0) success
build-cuda (3.10, 2.1, 12.1.0) success
build-cuda (3.10, 2.2, 12.1.0) success
build-cuda (3.11, 2.1, 12.1.0) success
build-cuda (3.11, 2.2, 12.1.0) success
build-pl (3.10, 2.0, 11.8.0) success
build-pl (3.10, 2.1, 12.1.0) success
build-pl (3.10, 2.2, 12.1.0) success
build-pl (3.11, 2.1, 12.1.0) success
build-pl (3.11, 2.2, 12.1.0) success

These checks are required after the changes to requirements/pytorch/base.txt, requirements/fabric/base.txt.

🟢 lightning_fabric: CPU workflow
Check ID Status
fabric-cpu (macOS-11, lightning, 3.8, 2.0, oldest) success
fabric-cpu (macOS-11, lightning, 3.10, 2.0) success
fabric-cpu (macOS-11, lightning, 3.11, 2.1) success
fabric-cpu (macOS-11, lightning, 3.11, 2.2) success
fabric-cpu (macOS-14, lightning, 3.10, 2.3) success
fabric-cpu (ubuntu-20.04, lightning, 3.8, 2.0, oldest) success
fabric-cpu (ubuntu-20.04, lightning, 3.10, 2.0) success
fabric-cpu (ubuntu-20.04, lightning, 3.11, 2.1) success
fabric-cpu (ubuntu-20.04, lightning, 3.11, 2.2) success
fabric-cpu (ubuntu-20.04, lightning, 3.11, 2.3) success
fabric-cpu (windows-2022, lightning, 3.8, 2.0, oldest) success
fabric-cpu (windows-2022, lightning, 3.10, 2.0) success
fabric-cpu (windows-2022, lightning, 3.11, 2.1) success
fabric-cpu (windows-2022, lightning, 3.11, 2.2) success
fabric-cpu (windows-2022, lightning, 3.11, 2.3) success
fabric-cpu (macOS-11, fabric, 3.8, 2.0) success
fabric-cpu (ubuntu-20.04, fabric, 3.8, 2.0) success
fabric-cpu (windows-2022, fabric, 3.8, 2.0) success
fabric-cpu (macOS-12, fabric, 3.11, 2.0) success
fabric-cpu (macOS-12, fabric, 3.11, 2.1) success
fabric-cpu (ubuntu-22.04, fabric, 3.11, 2.0) success
fabric-cpu (ubuntu-22.04, fabric, 3.11, 2.1) success
fabric-cpu (windows-2022, fabric, 3.11, 2.0) success
fabric-cpu (windows-2022, fabric, 3.11, 2.1) success

These checks are required after the changes to requirements/fabric/base.txt, src/lightning/fabric/utilities/testing/_runif.py, tests/tests_fabric/strategies/test_ddp_integration.py, tests/tests_fabric/utilities/test_distributed.py.

🟢 lightning_fabric: Azure GPU
Check ID Status
lightning-fabric (GPUs) (testing Fabric | latest) success
lightning-fabric (GPUs) (testing Lightning | latest) success

These checks are required after the changes to requirements/fabric/base.txt, src/lightning/fabric/utilities/testing/_runif.py, tests/tests_fabric/strategies/test_ddp_integration.py, tests/tests_fabric/utilities/test_distributed.py.

🟢 mypy
Check ID Status
mypy success

These checks are required after the changes to requirements/fabric/base.txt, requirements/pytorch/base.txt, src/lightning/fabric/utilities/testing/_runif.py.

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

These checks are required after the changes to src/lightning/fabric/utilities/testing/_runif.py, requirements/fabric/base.txt, requirements/pytorch/base.txt.


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.

Copy link

codecov bot commented Jun 21, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 59%. Comparing base (709a2a9) to head (5edc8d8).

❗ There is a different number of reports uploaded between BASE (709a2a9) and HEAD (5edc8d8). Click for more details.

HEAD has 5 uploads more than BASE | Flag | BASE (709a2a9) | HEAD (5edc8d8) | |------|------|------| |pytest|30|28| |lightning_fabric|4|10| |python3.10|16|14| |cpu|48|45| |pytorch_lightning|10|9| |pytest-full|24|21| |python3.11|6|19| |pytorch2.1|6|4| |pytorch2.3|3|2|
Additional details and impacted files
@@            Coverage Diff            @@
##           master   #20004     +/-   ##
=========================================
- Coverage      84%      59%    -25%     
=========================================
  Files         426      421      -5     
  Lines       35293    35195     -98     
=========================================
- Hits        29709    20769   -8940     
- Misses       5584    14426   +8842     

@awaelchli awaelchli added this to the 2.3.x milestone Jun 21, 2024
@awaelchli awaelchli changed the title [WIP] Skip tests that have torch-numpy compatibility conflict Skip tests that have torch-numpy compatibility conflict Jun 21, 2024
@awaelchli awaelchli changed the title Skip tests that have torch-numpy compatibility conflict Fix torch-numpy compatibility conflict in tests Jun 21, 2024
@awaelchli awaelchli merged commit e330da5 into master Jun 22, 2024
131 checks passed
@awaelchli awaelchli deleted the tests/numpy-compatibility branch June 22, 2024 00:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file fabric lightning.fabric.Fabric pl Generic label for PyTorch Lightning package tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants