Revert "[UV] update torch version"#417
Conversation
This reverts commit 5906d3a.
There was a problem hiding this comment.
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.
| ] | ||
| tpu = [ | ||
| "torch>=2.11.0", | ||
| "torch==2.10.0", |
There was a problem hiding this comment.
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.
| "torch==2.10.0", | |
| "torch==2.9.0", |
| [project.optional-dependencies] | ||
| cuda = [ | ||
| "torch>=2.11.0", | ||
| "torch>=2.10.0", |
There was a problem hiding this comment.
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.
| data = [ | ||
| "ray[default]>=2.52.1", | ||
| "torch>=2.11.0", | ||
| "torch>=2.10.0", |
Reverts #414