Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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",
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]",

]
dev = [
"pre-commit>=4.4.0",
Expand All @@ -46,12 +46,12 @@ tpu = [
]
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]",

"zstandard>=0.25.0",
"aiobotocore>=3.0.0",
]
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",

]

[tool.hatch.build.targets.wheel]
Expand Down
Loading