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

Commit 3fb8310

Browse files
rahul-tulimarkurtzdbogunowiczKSGulin
authored
[BugFix]: Limit torch version installed by ultralytics (#1580)
* [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 * Update docs with latest supported torch versions (#1593) --------- Co-authored-by: Mark Kurtz <mark.kurtz@neuralmagic.com> Co-authored-by: dbogunowicz <97082108+dbogunowicz@users.noreply.github.com> Co-authored-by: Konstantin Gulin <66528950+KSGulin@users.noreply.github.com>
1 parent 5db7e17 commit 3fb8310

File tree

3 files changed

+9
-4
lines changed

3 files changed

+9
-4
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ SparseML enables you to create a sparse model trained on your dataset in two way
107107
This repository is tested on Python 3.7-3.10, and Linux/Debian systems.
108108

109109
It is recommended to install in a [virtual environment](https://docs.python.org/3/library/venv.html) to keep your system in order.
110-
Currently supported ML Frameworks are the following: `torch>=1.1.0,<=1.12.1`, `tensorflow>=1.8.0,<2.0.0`, `tensorflow.keras >= 2.2.0`.
110+
Currently supported ML Frameworks are the following: `torch>=1.1.0,<1.14`, `tensorflow>=1.8.0,<2.0.0`, `tensorflow.keras >= 2.2.0`.
111111

112112
Install with pip using:
113113

docs/source/installation.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ limitations under the License.
1818

1919
This repository is tested on Python 3.7-3.10, and Linux/Debian systems.
2020
It is recommended to install in a [virtual environment](https://docs.python.org/3/library/venv.html) to keep your system in order.
21-
Currently supported ML Frameworks are the following: `torch>=1.1.0,<=1.8.0`, `tensorflow>=1.8.0,<=2.0.0`, `tensorflow.keras >= 2.2.0`.
21+
Currently supported ML Frameworks are the following: `torch>=1.1.0,<1.14`, `tensorflow>=1.8.0,<=2.0.0`, `tensorflow.keras >= 2.2.0`.
2222

2323
Install with pip using:
2424

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 + [
@@ -118,7 +119,11 @@
118119
"tensorboardX>=1.0",
119120
]
120121

121-
_ultralytics_deps = ["ultralytics==8.0.30"]
122+
123+
_ultralytics_deps = [
124+
"ultralytics==8.0.30",
125+
supported_torch_version,
126+
]
122127

123128

124129
def _setup_packages() -> List:

0 commit comments

Comments
 (0)