CI: Removed the pytorch upper-bound version in pyproject.toml#671
Merged
Conversation
Changed CI to use a `-c torch-constraints.txt` that gets JIT-built from our versions.json file to constrain the correct torch version. Signed-off-by: Jonathan Swartz <jonathan@jswartz.info>
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates packaging and CI to remove the PyTorch upper-bound from pyproject.toml and instead pin the tested PyTorch version in CI via a generated constraints file, keeping the project dependency flexible for end users while CI remains deterministic.
Changes:
- Remove the
<2.13upper bound from thetorchdependency inpyproject.toml. - Update multiple GitHub Actions workflows to install dependencies using
uv pip install -c torch-constraints.txt ...sotorchresolves to the intended matrix/versioned value. - Standardize CUDA-index installs by applying the torch pin via constraints instead of direct
torch==...requirement in the install command.
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
pyproject.toml |
Removes the PyTorch upper bound from runtime dependencies. |
.github/workflows/publish.yml |
Switches build + smoke-test installs to pin torch via a generated constraints file. |
.github/workflows/nightly-publish.yml |
Switches nightly build environment setup to pin torch via a generated constraints file. |
.github/workflows/cu130.yml |
Adds a generated torch constraints file to constrain torch during build/test installs. |
.github/workflows/cu130-nightly.yml |
Adds a generated torch constraints file to constrain torch during nightly build/test installs. |
.github/workflows/cu128.yml |
Adds a generated torch constraints file to constrain torch during build/test installs. |
.github/workflows/cu128-nightly.yml |
Adds a generated torch constraints file to constrain torch during nightly build/test installs. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Address Copilot review feedback on openvdb#671: the publish and nightly-publish constraint files hard-coded the torch patch as `.0` (e.g. via `${{ matrix.torch-version }}.0`), which would silently diverge from `.github/versions.json` if `torch.full_version` became a non-`.0` patch (e.g. 2.11.1). Source the pin from the `torch-full-version` output of the versions job so every workflow shares a single source of truth. Signed-off-by: Jonathan Swartz <jonathan@jswartz.info>
matthewdcong
approved these changes
Jun 25, 2026
matthewdcong
left a comment
Contributor
There was a problem hiding this comment.
Nice one, thanks @swahtz
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.
Removed the
<2.13from the torch requirements in thepyproject.tomlChange all the CI workflows that build their environments with uv/pip to use a
-c torch-constraints.txtthat gets JIT-built from ourversions.jsonfile to constrain the correct torch versionThis was inspired by a conversation with @jameslamb in our conda-forge feedstock: conda-forge/fvdb-core-feedstock#34 (comment)