Skip to content

Commit 27c7ebc

Browse files
Max py (#2017)
1 parent c3080aa commit 27c7ebc

File tree

2 files changed

+23
-21
lines changed

2 files changed

+23
-21
lines changed

.github/workflows/ci.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,8 @@ jobs:
3838
- name: Install requirements
3939
shell: bash # for Windows compatibility
4040
run: |
41-
sed -i'' -e 's/index = "torch-gpu"/index = "torch-cpu"/g' pyproject.toml
4241
python -m pip install --upgrade pip setuptools wheel uv
42+
sed -i'' -e 's/index = "torch-gpu"/index = "torch-cpu"/g' pyproject.toml
4343
uv sync --group yolo
4444
- name: Generate detections and embeddings
4545
run: |
@@ -74,9 +74,9 @@ jobs:
7474
- name: Install requirements
7575
shell: bash # for Windows compatibility
7676
run: |
77-
sed -i'' -e 's/index = "torch-gpu"/index = "torch-cpu"/g' pyproject.toml
7877
python -m pip install --upgrade pip setuptools wheel uv
79-
uv sync --group yolo --group evolve
78+
sed -i'' -e 's/index = "torch-gpu"/index = "torch-cpu"/g' pyproject.toml
79+
uv sync --group yolo --group evolve
8080
- name: Evolve set of parameters for selected tracking method
8181
run: |
8282
source .venv/bin/activate
@@ -205,7 +205,7 @@ jobs:
205205
run: |
206206
sed -i'' -e 's/index = "torch-gpu"/index = "torch-cpu"/g' pyproject.toml
207207
python -m pip install --upgrade pip setuptools wheel uv
208-
uv sync --group yolo
208+
uv sync --group yolo
209209
- name: Test tracking with seg models
210210
env:
211211
IMG: ./assets/MOT17-mini/train/MOT17-02-FRCNN/img1/000001.jpg
@@ -229,7 +229,7 @@ jobs:
229229
run: |
230230
sed -i'' -e 's/index = "torch-gpu"/index = "torch-cpu"/g' pyproject.toml
231231
python -m pip install --upgrade pip setuptools wheel uv
232-
uv sync --all-groups
232+
uv sync --all-groups
233233
# needed for TFLite export
234234
sudo apt-get install flatbuffers-compiler
235235
wget https://github.com/PINTO0309/onnx2tf/releases/download/1.16.31/flatc.tar.gz

pyproject.toml

Lines changed: 18 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -7,30 +7,31 @@
77
#######################
88

99
[[tool.uv.index]]
10-
name = "torch-gpu"
11-
url = "https://download.pytorch.org/whl/cu121"
10+
name = "torch-cpu"
11+
url = "https://download.pytorch.org/whl/cpu"
1212
explicit = true
1313

14+
1415
[[tool.uv.index]]
15-
name = "torch-cpu"
16-
url = "https://download.pytorch.org/whl/cpu"
16+
name = "torch-gpu"
17+
url = "https://download.pytorch.org/whl/cu121"
1718
explicit = true
1819

19-
#################################
20-
# Dependency-to-Index Mapping #
21-
#################################
20+
##################################
21+
# Pin torch/vision to *an* index #
22+
##################################
2223

24+
[tool.uv.sources]
2325
torch = [
24-
# CUDA build on Linux/Windows only
25-
{ index = "torch-gpu", marker = "sys_platform != 'darwin'" },
26-
# CPU build on macOS
27-
{ index = "torch-cpu", marker = "sys_platform == 'darwin'" }
26+
{ index = "torch-cpu", marker = "sys_platform == 'darwin'" },
27+
{ index = "torch-gpu", marker = "sys_platform == 'linux' or sys_platform == 'win32'" },
2828
]
2929
torchvision = [
30-
{ index = "torch-gpu", marker = "sys_platform != 'darwin'" },
31-
{ index = "torch-cpu", marker = "sys_platform == 'darwin'" }
30+
{ index = "torch-cpu", marker = "sys_platform == 'darwin'" },
31+
{ index = "torch-gpu", marker = "sys_platform == 'linux' or sys_platform == 'win32'" },
3232
]
3333

34+
3435
#########################
3536
# UV-specific Overrides #
3637
#########################
@@ -43,6 +44,7 @@ requires-dist = ["onnx>=1.17.0", "onnxsim<1.0.0,>=0.4.36"]
4344
[tool.uv]
4445
no-build-isolation-package = ["yolox"]
4546

47+
4648
############
4749
# Flake8 #
4850
############
@@ -111,12 +113,12 @@ keywords = [
111113
]
112114

113115
dependencies = [
114-
"setuptools>=78.0.0",
116+
"setuptools",
115117
"filterpy<2.0.0,>=1.4.5",
116118
"gdown<6.0.0,>=5.1.0",
117119
"lapx<1.0.0,>=0.5.5",
118120
"loguru<1.0.0,>=0.7.2",
119-
"numpy==1.26.4",
121+
"numpy",
120122
"pyyaml<7.0.0,>=6.0.1",
121123
"regex<2025.0.0,>=2024.0.0",
122124
"yacs<1.0.0,>=0.1.8",
@@ -155,7 +157,7 @@ evolve = [
155157
dev = ["ipykernel<7.0.0,>=6.29.5"]
156158

157159
yolox-build-deps = [
158-
"setuptools>=78.0.0",
160+
"setuptools",
159161
"torch<3.0.0,>=2.2.1",
160162
]
161163

0 commit comments

Comments
 (0)