Skip to content
Open
Changes from 2 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
15 changes: 8 additions & 7 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -114,22 +114,23 @@ def localversion_func(version: ScmVersion) -> str:
("pyyaml>=6.0.1,<=6.0.3" if BUILD_TYPE == "release" else "pyyaml>=6.0.1"),
# librosa dependency numba is currently not compatible with numpy>=2.3
# https://numba.readthedocs.io/en/stable/user/installing.html#version-support-information
("numpy>=2.0.0,<=2.3.3" if BUILD_TYPE == "release" else "numpy>=2.0.0"),
("numpy>=2.0.0,<=2.3.5" if BUILD_TYPE == "release" else "numpy>=2.0.0"),
(
"requests>=2.32.2,<=2.32.5"
if BUILD_TYPE == "release"
else "requests>=2.32.2"
),
("tqdm>=4.66.3,<=4.67.1" if BUILD_TYPE == "release" else "tqdm>=4.66.3"),
("torch>=2.7.0,<=2.8.0" if BUILD_TYPE == "release" else "torch>=2.7.0"),
("torch>=2.7.0,<=2.9.1" if BUILD_TYPE == "release" else "torch>=2.7.0"),
(
"transformers>=4.54.0,<=4.56.2"
"transformers>=4.54.0,<=4.57.3"
if BUILD_TYPE == "release"
else "transformers>=4.54.0"
),
("datasets>=4.0.0,<=4.1.1" if BUILD_TYPE == "release" else "datasets>=4.0.0"),
("datasets>=4.0.0,<=4.4.1" if BUILD_TYPE == "release" else "datasets>=4.0.0"),
# auto-round 0.9.1 requires accelerate >= 1.10.0
(
"accelerate>=1.6.0,<=1.10.1"
"accelerate>=1.10.0,<=1.12.0"
if BUILD_TYPE == "release"
else "accelerate>=1.6.0"
Copy link
Contributor

Choose a reason for hiding this comment

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

high

The accelerate dependency for non-release builds is set to >=1.6.0. However, the comment on line 131 states that auto-round==0.9.1 requires accelerate >= 1.10.0. Since auto-round is a dependency for all build types, the lower bound for accelerate should be 1.10.0 for non-release builds as well to avoid potential dependency conflicts.

Suggested change
else "accelerate>=1.6.0"
else "accelerate>=1.10.0"

),
Expand All @@ -138,13 +139,13 @@ def localversion_func(version: ScmVersion) -> str:
if BUILD_TYPE == "release"
else "nvidia-ml-py>=12.560.30"
),
("pillow>=10.4.0,<=11.3.0" if BUILD_TYPE == "release" else "pillow>=10.4.0"),
("pillow>=10.4.0,<=12.0.0" if BUILD_TYPE == "release" else "pillow>=10.4.0"),
(
"compressed-tensors==0.12.2"
if BUILD_TYPE == "release"
else "compressed-tensors>=0.12.3a2"
),
("auto-round==0.9.1"),
("auto-round==0.9.1" if BUILD_TYPE == "release" else "auto-round==0.9.1"),
Copy link
Contributor

Choose a reason for hiding this comment

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

medium

The conditional logic for the auto-round dependency is redundant as it specifies the same version 0.9.1 for both release and non-release builds. This can be simplified to a static dependency for better readability and maintainability.

Suggested change
("auto-round==0.9.1" if BUILD_TYPE == "release" else "auto-round==0.9.1"),
("auto-round==0.9.1"),

Copy link
Collaborator

Choose a reason for hiding this comment

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

I think we may want to update this to be its own install tag, similar to dev

e. g uv pip install -e .[dev,autoround]

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Updated, I'll file another PR for the workflows to use the new [autoround] install tag.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

],
extras_require={
"dev": [
Expand Down