Skip to content
This repository was archived by the owner on Jun 3, 2025. It is now read-only.

Commit 4a6044b

Browse files
authored
[Cherry-Pick] #1580 (#1582)
* [Fix] limit torch version installed by ultralytics to our max supported version * Update max torch version to <1.14 as requested by @mgoin, this should be safe as after 1.13.1 next torch version on pypi is 2.0 https://pypi.org/project/torch/#history * Refactor torch supported versions to a variable for a single source of truth
1 parent 4cfe8e2 commit 4a6044b

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

setup.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,8 +61,9 @@
6161
_deepsparse_ent_deps = [f"deepsparse-ent~={version_nm_deps}"]
6262

6363
_onnxruntime_deps = ["onnxruntime>=1.0.0"]
64+
supported_torch_version = "torch>=1.7.0,<1.14"
6465
_pytorch_deps = [
65-
"torch>=1.1.0,<=1.13.1",
66+
supported_torch_version,
6667
"gputils",
6768
]
6869
_pytorch_all_deps = _pytorch_deps + [
@@ -115,7 +116,11 @@
115116
"tensorboardX>=1.0",
116117
]
117118

118-
_ultralytics_deps = ["ultralytics==8.0.30"]
119+
120+
_ultralytics_deps = [
121+
"ultralytics==8.0.30",
122+
supported_torch_version,
123+
]
119124

120125

121126
def _setup_packages() -> List:

0 commit comments

Comments
 (0)