Skip to content

[TORCH] pin version#418

Merged
mayank31398 merged 1 commit intomainfrom
torch
Apr 17, 2026
Merged

[TORCH] pin version#418
mayank31398 merged 1 commit intomainfrom
torch

Conversation

@mayank31398
Copy link
Copy Markdown
Collaborator

No description provided.

Signed-off-by: Mayank Mishra <mayank31398@gmail.com>
@mayank31398 mayank31398 changed the title [TORCH] update torch version [TORCH] pin version Apr 17, 2026
@mayank31398 mayank31398 merged commit 6ca09e6 into main Apr 17, 2026
2 checks passed
@mayank31398 mayank31398 deleted the torch branch April 17, 2026 02:51
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 pins the torch dependency to version 2.10.0 across the cuda, data, and torch optional dependency groups. Feedback suggests using a version range instead of an exact pin to prevent dependency conflicts and notes a version mismatch with torch-xla. Additionally, it is recommended to reference the torch extra within other groups to improve maintainability and consistency.

Comment thread pyproject.toml
]
torch = [
"torch>=2.10.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

Pinning torch to an exact version is generally discouraged for libraries as it can lead to dependency conflicts for users. It is recommended to use a version range (e.g., >=2.10.0, <3.0.0) to allow for minor updates and better compatibility. Additionally, there is a version mismatch in the tpu extra (line 45), which specifies torch-xla==2.9.0. Since torch-xla versions must match the torch version, updating torch to 2.10.0 without a corresponding update to torch-xla will cause runtime issues for TPU users.

Suggested change
"torch==2.10.0",
"torch>=2.10.0, <3.0.0",

Comment thread pyproject.toml
[project.optional-dependencies]
cuda = [
"torch>=2.10.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

To improve maintainability and ensure consistency across different installation options, consider referencing the torch extra instead of hardcoding the version string. This allows you to manage the PyTorch version requirement in a single location.

Suggested change
"torch==2.10.0",
"lm-engine[torch]",

Comment thread pyproject.toml
data = [
"ray[default]>=2.52.1",
"torch>=2.10.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

Referencing the torch extra here avoids duplication and reduces the risk of version mismatches across different extras.

Suggested change
"torch==2.10.0",
"lm-engine[torch]",

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