ci: Test Python 3.15 with torch nightly - #788
Merged
Merged
Conversation
* Add a Python 3.15 + torch nightly config to the tests matrix * Install torch nightly before the other dependencies in install-deps, so that it works on Python versions for which no stable torch wheel exists yet * Remove tests/profiling/__init__.py, which shadowed the new stdlib profiling package (PEP 799) and broke import cProfile (and thus torch._dynamo and torchvision) when running tests on Python 3.15 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LnhiXDUDYQhk7YvfpMC61d
sparsediffpy, a dependency of cvxpy, has no Python 3.15 wheel yet and fails to build from source on ubuntu-latest because BLAS is not installed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LnhiXDUDYQhk7YvfpMC61d
Member
Yeah, could we instead rename Apart from that I think we should merge this already. |
ValerianRey
marked this pull request as ready for review
September 29, 2026 18:45
ValerianRey
requested review from
a team,
PierreQuinton and
ValerianRey
as code owners
September 29, 2026 18:45
Renaming the folder avoids shadowing the stdlib profiling package added in Python 3.15, so its __init__.py can be restored. Also rename PROFILING_RESULTS_DIR to PROFILER_RESULTS_DIR. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LnhiXDUDYQhk7YvfpMC61d
Contributor
Author
|
Rename done ✅ |
ValerianRey
approved these changes
Sep 30, 2026
Member
|
@PierreQuinton fyi |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This is a first step towards Python 3.15 support: it runs the tests on Python 3.15 in the CI, using torch nightly since stable torch doesn't ship
cp315wheels yet. It doesn't make support official (no classifier, no change toinstallation.md, no changelog entry). I thought that would be better done in a follow-up, like #474, once stable torch supports 3.15. Happy to change the scope if you'd prefer it another way.quadprog_projectorandfairgradoptions.cvxpy(needed bycagradandnash_mtl) is left out for now: its dependencysparsediffpyhas nocp315wheel yet, and building it from source onubuntu-latestfails because BLAS isn't installed. Once wheels are available, this could switch tofull.install-deps, install torch nightly before the other dependencies instead of upgrading to it afterwards. Otherwise, the first install fails on Python 3.15 because no stable torch wheel matches. The existing torch-nightly config should end up with the same packages as before.tests/profilingtotests/profiler(andPROFILING_RESULTS_DIRtoPROFILER_RESULTS_DIR). Python 3.15 adds a stdlibprofilingpackage (PEP 799), and sincetests/is onsys.pathduring the tests,tests/profilingshadowed it. This brokeimport cProfile, and thereforetorch._dynamoandtorchvision, so test collection failed.Local checks, following
CONTRIBUTING.md:2.15.0.dev20260929, without options: 2737 passed, 79 skipped, 33 xfailed.[quadprog_projector,fairgrad]: 3140 passed and 1 failed (with[full], which builds on macOS thanks to Accelerate: 3280 passed and the same 1 failed):test_upgrad.py::test_permutation_invariant[UPGrad-T[20, 100]1], which is off by 5.6e-7 against a 5e-7 tolerance. I get the same failure on Python 3.14 + torch nightly on my machine (macOS arm64), and the torch-nightly job onmainis green on Linux, so I believe it's platform-specific and unrelated to Python 3.15.[full]:pytest -W error tests/unitpasses, andty check,pre-commit run --all-files,make doctestandmake htmlpass too.🤖 Generated with Claude Code
https://claude.ai/code/session_01LnhiXDUDYQhk7YvfpMC61d