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 Python 3.12 to the CPU test matrix #20078

Merged
merged 12 commits into from
Jul 13, 2024
Merged

Add Python 3.12 to the CPU test matrix #20078

merged 12 commits into from
Jul 13, 2024

Conversation

awaelchli
Copy link
Contributor

@awaelchli awaelchli commented Jul 12, 2024

What does this PR do?

Adds Python 3.12 to the test matrix for PyTorch 3.12.
For consistency, I'm distributing the other Python versions (3.10 and 3.11) to the PyTorch versions 2.1, 2.2, 2.3 so that it's easier to establish a pattern while still remaining diverse enough to cover the common combinations.

This PR only deals with the CPU tests for now. Will do GPU in a separate PR.

Notable updates:

  1. AdvancedProfiler: Python 3.12 surfaces an issue that existed in prior versions as well, but is now an error: Another profiling tool is already active #19983. I skipped these tests on Python 3.12 for now, because the fix requires some work (unclear yet how to resolve).
  2. In 3.12, the instance check isinstance(LightningOptimizer(), Optimizable) against our runtime-checkable Optimizable class no longer works. But there is no real use case for this, except one test which asserted this, and I removed it because it does not reflect a real use case.

cc @carmocca @Borda @justusschock @awaelchli

@github-actions github-actions bot added the ci Continuous Integration label Jul 12, 2024
@awaelchli awaelchli added this to the 2.4 milestone Jul 12, 2024
Copy link

codecov bot commented Jul 12, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 90%. Comparing base (d5ae9ec) to head (3572c6e).
Report is 59 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master   #20078   +/-   ##
=======================================
  Coverage      90%      90%           
=======================================
  Files         266      266           
  Lines       22961    22961           
=======================================
  Hits        20690    20690           
  Misses       2271     2271           

@github-actions github-actions bot added fabric lightning.fabric.Fabric pl Generic label for PyTorch Lightning package dependencies Pull requests that update a dependency file labels Jul 12, 2024
@awaelchli awaelchli added the fun Staff contributions outside working hours - to differentiate from the "community" label label Jul 12, 2024
@awaelchli awaelchli marked this pull request as ready for review July 12, 2024 23:57
Copy link
Contributor

github-actions bot commented Jul 12, 2024

⚡ Required checks status: All passing 🟢

Groups summary

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

These checks are required after the changes to .github/workflows/ci-tests-pytorch.yml, requirements/pytorch/test.txt, tests/tests_pytorch/core/test_lightning_optimizer.py, tests/tests_pytorch/profilers/test_profiler.py.

🟢 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/test.txt, src/lightning/__setup__.py, tests/tests_pytorch/core/test_lightning_optimizer.py, tests/tests_pytorch/profilers/test_profiler.py.

🟢 pytorch_lightning: Benchmarks
Check ID Status
lightning.Benchmarks success

These checks are required after the changes to requirements/pytorch/test.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/test.txt.

🟢 pytorch_lightning: Docker
Check ID Status
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-cuda (3.11, 2.3, 12.1.0) success
build-cuda (3.11, 2.4, 12.1.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
build-pl (3.11, 2.3, 12.1.0) success
build-pl (3.11, 2.4, 12.1.0) success

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

🟢 lightning_fabric: CPU workflow
Check ID Status
fabric-cpu (macOS-13, lightning, 3.9, 2.1, oldest) success
fabric-cpu (macOS-14, lightning, 3.10, 2.1) success
fabric-cpu (macOS-14, lightning, 3.11, 2.2) success
fabric-cpu (macOS-14, lightning, 3.11, 2.3) success
fabric-cpu (ubuntu-20.04, lightning, 3.9, 2.1, oldest) success
fabric-cpu (ubuntu-20.04, lightning, 3.10, 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.9, 2.1, oldest) success
fabric-cpu (windows-2022, lightning, 3.10, 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-14, fabric, 3.9, 2.1) success
fabric-cpu (ubuntu-20.04, fabric, 3.9, 2.1) success
fabric-cpu (windows-2022, fabric, 3.9, 2.1) success
fabric-cpu (macOS-12, fabric, 3.10, 2.1) success
fabric-cpu (ubuntu-22.04, fabric, 3.10, 2.1) success
fabric-cpu (windows-2022, fabric, 3.10, 2.1) success

These checks are required after the changes to tests/tests_fabric/test_wrappers.py, .github/workflows/ci-tests-fabric.yml.

🟢 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 src/lightning/__setup__.py, tests/tests_fabric/test_wrappers.py.

🟢 mypy
Check ID Status
mypy success

These checks are required after the changes to requirements/pytorch/test.txt, src/lightning/__setup__.py.

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

These checks are required after the changes to src/lightning/__setup__.py, requirements/pytorch/test.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.

@awaelchli awaelchli merged commit bdafe5e into master Jul 13, 2024
121 of 129 checks passed
@awaelchli awaelchli deleted the tests/python312 branch July 13, 2024 10:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ci Continuous Integration dependencies Pull requests that update a dependency file fabric lightning.fabric.Fabric fun Staff contributions outside working hours - to differentiate from the "community" label pl Generic label for PyTorch Lightning package tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants