Skip to content

Commit b675c06

Browse files
committed
update deps
1 parent 7efd22d commit b675c06

File tree

2 files changed

+137
-79
lines changed

2 files changed

+137
-79
lines changed

pyproject.toml

Lines changed: 24 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -14,18 +14,11 @@ dependencies = [
1414
[project.optional-dependencies]
1515
mlx = ["mlx>=0.25.0"]
1616

17-
[tool.uv.sources]
18-
einops = { git = "https://github.com/ifsheldon/einops", branch = "mlx-backend" }
19-
2017
[dependency-groups]
21-
dev = [
22-
"nbdev>=2.3.37",
23-
"torch>=2.6.0",
24-
"torchvision>=0.21.0",
25-
"poethepoet>=0.33.1",
26-
"pytest>=8.3.5",
27-
"ruff>=0.11.5",
28-
]
18+
19+
torch = ["torch>=2.6.0", "torchvision>=0.21.0"]
20+
21+
dev = ["nbdev>=2.3.37", "poethepoet>=0.33.1", "pytest>=8.3.5", "ruff>=0.11.5"]
2922

3023
notebook = [
3124
"matplotlib>=3.10.1",
@@ -38,6 +31,25 @@ ref-code-deps = ["opencv-python>=4.11.0.86"]
3831

3932
mlx = ["mlx>=0.25.0"]
4033

34+
35+
[tool.uv.sources]
36+
einops = { git = "https://github.com/ifsheldon/einops", branch = "mlx-backend" }
37+
torch = [
38+
{ index = "torch-cpu", marker = "platform_system == 'Darwin'" },
39+
{ index = "torch-gpu", marker = "platform_system == 'Linux'" },
40+
]
41+
42+
43+
[[tool.uv.index]]
44+
name="torch-cpu"
45+
url = "https://download.pytorch.org/whl/cpu"
46+
explicit = true
47+
48+
[[tool.uv.index]]
49+
name="torch-gpu"
50+
url = "https://download.pytorch.org/whl/cu128"
51+
explicit = true
52+
4153
[build-system]
4254
requires = ["hatchling"]
4355
build-backend = "hatchling.build"
@@ -50,7 +62,7 @@ only-include = ["tensor_network"]
5062

5163
[tool.uv]
5264
# include dev, notebook, and ref-code-deps in the default groups for running the notebooks
53-
default-groups = ["dev", "notebook", "ref-code-deps", "mlx"]
65+
default-groups = ["dev", "notebook", "ref-code-deps", "mlx", "torch"]
5466

5567
[tool.ruff]
5668
extend-exclude = ["tensor_network", "setup.py"]

0 commit comments

Comments
 (0)