-
Notifications
You must be signed in to change notification settings - Fork 29
[TORCH] pin version #418
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[TORCH] pin version #418
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -31,7 +31,7 @@ Repository = "https://github.com/open-lm-engine/lm-engine" | |||||
|
|
||||||
| [project.optional-dependencies] | ||||||
| cuda = [ | ||||||
| "torch>=2.10.0", | ||||||
| "torch==2.10.0", | ||||||
| ] | ||||||
| dev = [ | ||||||
| "pre-commit>=4.4.0", | ||||||
|
|
@@ -46,12 +46,12 @@ tpu = [ | |||||
| ] | ||||||
| data = [ | ||||||
| "ray[default]>=2.52.1", | ||||||
| "torch>=2.10.0", | ||||||
| "torch==2.10.0", | ||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||||||
| "zstandard>=0.25.0", | ||||||
| "aiobotocore>=3.0.0", | ||||||
| ] | ||||||
| torch = [ | ||||||
| "torch>=2.10.0", | ||||||
| "torch==2.10.0", | ||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 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
|
||||||
| ] | ||||||
|
|
||||||
| [tool.hatch.build.targets.wheel] | ||||||
|
|
||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.