@@ -14,18 +14,11 @@ dependencies = [
14
14
[project .optional-dependencies ]
15
15
mlx = [" mlx>=0.25.0" ]
16
16
17
- [tool .uv .sources ]
18
- einops = { git = " https://github.com/ifsheldon/einops" , branch = " mlx-backend" }
19
-
20
17
[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" ]
29
22
30
23
notebook = [
31
24
" matplotlib>=3.10.1" ,
@@ -38,6 +31,25 @@ ref-code-deps = ["opencv-python>=4.11.0.86"]
38
31
39
32
mlx = [" mlx>=0.25.0" ]
40
33
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
+
41
53
[build-system ]
42
54
requires = [" hatchling" ]
43
55
build-backend = " hatchling.build"
@@ -50,7 +62,7 @@ only-include = ["tensor_network"]
50
62
51
63
[tool .uv ]
52
64
# 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 " ]
54
66
55
67
[tool .ruff ]
56
68
extend-exclude = [" tensor_network" , " setup.py" ]
0 commit comments