Skip to content

Update torchvision version to 0.25.0a0#1694

Merged
ktangsali merged 1 commit into
NVIDIA:mainfrom
ktangsali:update-torchvision
Jun 4, 2026
Merged

Update torchvision version to 0.25.0a0#1694
ktangsali merged 1 commit into
NVIDIA:mainfrom
ktangsali:update-torchvision

Conversation

@ktangsali
Copy link
Copy Markdown
Collaborator

PhysicsNeMo Pull Request

Description

Update the lower bound of torchvision version to satisfy the NVAIE builds. Without this, the pip install will update torchvision (and with it, torch too) which breaks the builds.

Checklist

Dependencies

Review Process

All PRs are reviewed by the PhysicsNeMo team before merging.

Depending on which files are changed, GitHub may automatically assign a maintainer for review.

We are also testing AI-based code review tools (e.g., Greptile), which may add automated comments with a confidence score.
This score reflects the AI’s assessment of merge readiness and is not a qualitative judgment of your work, nor is
it an indication that the PR will be accepted / rejected.

AI-generated feedback should be reviewed critically for usefulness.
You are not required to respond to every AI comment, but they are intended to help both authors and reviewers.
Please react to Greptile comments with 👍 or 👎 to provide feedback on their accuracy.

@copy-pr-bot
Copy link
Copy Markdown

copy-pr-bot Bot commented Jun 3, 2026

Auto-sync is disabled for draft pull requests in this repository. Workflows must be run manually.

Contributors can view more details about this message here.

@ktangsali ktangsali marked this pull request as ready for review June 3, 2026 23:41
@ktangsali ktangsali requested a review from coreyjadams as a code owner June 3, 2026 23:41
@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps Bot commented Jun 3, 2026

Greptile Summary

This PR updates the torchvision lower-bound version specifier from >=0.25.0 to >=0.25.0a0 in three places in pyproject.toml to prevent pip from upgrading torchvision (and transitively torch) in NVAIE builds that already have the 0.25.0a0 pre-release wheel installed.

  • 0.25.0a0 < 0.25.0 under PEP 440 semantics, so the old >=0.25.0 constraint did not accept the pre-release wheel, causing pip to pull in a newer stable torchvision and potentially a different torch version.
  • The change is applied consistently to the [project.dependencies], [project.optional-dependencies.cu13], and [project.optional-dependencies.cu12] groups. Normal users installing from PyPI are unaffected because pip does not select pre-release packages unless --pre is specified or the pre-release is already present.

Important Files Changed

Filename Overview
pyproject.toml Lowers torchvision version floor from >=0.25.0 to >=0.25.0a0 in main, cu13, and cu12 dependency groups so NVAIE builds with the pre-release wheel satisfy the constraint without pip upgrading torchvision/torch.

Reviews (1): Last reviewed commit: "Update torchvision version to 0.25.0a0" | Re-trigger Greptile

@ktangsali
Copy link
Copy Markdown
Collaborator Author

/blossom-ci

@ktangsali
Copy link
Copy Markdown
Collaborator Author

cc. @abokov-nv for viz.

@coreyjadams
Copy link
Copy Markdown
Collaborator

The goal here is to allow the prerelease in our pyproject.toml?

@ktangsali
Copy link
Copy Markdown
Collaborator Author

ktangsali commented Jun 4, 2026

The goal here is to allow the prerelease in our pyproject.toml?

Normal users installing from pypi won't be affected by this. Pip will not select pre-release packages unless --pre is specified or the pre-release is already present. The Production Branch Pytorch container (which is based on 26.03 Feature Branch Pytorch container) has a pre-release torchvision (0.25.0a0). Without this change, this line will force an update of torch vision followed by torch. While this should technically be ok, it causes ABI breakage of some libraries like transformer-engine (we rely on transformer-engine shipped in the PyTorch container). Also, we don't want to be overwriting the core packages like torch/transformer-engine etc. from the base container, at least for some of the more latest pytorch container releases.

Having this change now also future proofs next SFB release. For 25.08, we will likely use the same production branch (PB6, because PB7 won't be out for another 6-7 months) and will hit this issue again (hence the change to main. For 25.06 builds, I have already created a separate branch with this change and tested the build)

@ktangsali
Copy link
Copy Markdown
Collaborator Author

/blossom-ci

@ktangsali ktangsali enabled auto-merge June 4, 2026 17:17
@ktangsali ktangsali added this pull request to the merge queue Jun 4, 2026
Merged via the queue into NVIDIA:main with commit 14c90a8 Jun 4, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants