Skip to content

Revert "[UV] update torch version"#417

Merged
mayank31398 merged 1 commit intomainfrom
revert-414-torch
Apr 17, 2026
Merged

Revert "[UV] update torch version"#417
mayank31398 merged 1 commit intomainfrom
revert-414-torch

Conversation

@mayank31398
Copy link
Copy Markdown
Collaborator

Reverts #414

@mayank31398 mayank31398 merged commit 025787d into main Apr 17, 2026
2 checks passed
@mayank31398 mayank31398 deleted the revert-414-torch branch April 17, 2026 02:49
Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request downgrades the torch dependency across the cuda, tpu, and data extras in pyproject.toml. Review feedback identifies a critical version mismatch in the tpu configuration, where torch should be aligned with torch-xla at version 2.9.0 for binary compatibility. Additionally, it is noted that the >=2.10.0 constraints for the cuda and data extras are likely too permissive if the intent of the change is to exclude version 2.11.0.

Comment thread pyproject.toml
]
tpu = [
"torch>=2.11.0",
"torch==2.10.0",
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

high

There is a version mismatch between torch==2.10.0 and torch-xla==2.9.0 (on line 45). PyTorch XLA requires the major and minor versions of torch and torch-xla to match for binary compatibility and stability on TPU. Additionally, this extra uses an exact pin (==) while the cuda and data extras use >=, which is inconsistent. To ensure a stable TPU environment, it is recommended to align the torch version with the pinned torch-xla version.

Suggested change
"torch==2.10.0",
"torch==2.9.0",

Comment thread pyproject.toml
[project.optional-dependencies]
cuda = [
"torch>=2.11.0",
"torch>=2.10.0",
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The constraint torch>=2.10.0 still allows the installation of version 2.11.0 if it is available in the package registry. If the intent of this revert is to avoid issues introduced in version 2.11.0, this change may be ineffective as the package manager will still resolve to the highest compatible version. Consider using an exact pin or a version range (e.g., torch>=2.10.0,<2.11.0) to ensure the problematic version is not installed.

Comment thread pyproject.toml
data = [
"ray[default]>=2.52.1",
"torch>=2.11.0",
"torch>=2.10.0",
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

Similar to the cuda extra, the constraint torch>=2.10.0 here still permits version 2.11.0 to be resolved. If the goal of this revert is to avoid 2.11.0, consider using a more restrictive constraint or an exact pin.

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.

1 participant