File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -74,6 +74,11 @@ optional-dependencies.dev = [
7474 " sphinx-pyproject==0.3.0" ,
7575 " sphinx-substitution-extensions==2026.1.12" ,
7676 " sphinxcontrib-spelling==8.0.2" ,
77+ # Listed explicitly (despite being transitive via vws-python-mock) so that
78+ # [tool.uv.sources] can redirect to the CPU-only PyTorch index.
79+ # See: https://vws-python.github.io/vws-python-mock/installation.html#faster-installation
80+ " torch>=2.5.1" ,
81+ " torchvision>=0.20.1" ,
7782 " ty==0.0.17" ,
7883 " types-pyyaml==6.0.12.20250915" ,
7984 " vulture==2.14" ,
@@ -106,6 +111,11 @@ packages.find.where = [
106111# worrying about including the file in MANIFEST.in.
107112version_file = " src/vws_cli/_setuptools_scm_version.py"
108113
114+ [tool .uv ]
115+ sources.torch = { index = " pytorch-cpu" }
116+ sources.torchvision = { index = " pytorch-cpu" }
117+ index = [ { name = " pytorch-cpu" , url = " https://download.pytorch.org/whl/cpu" , explicit = true } ]
118+
109119[tool .ruff ]
110120line-length = 79
111121lint.select = [
@@ -278,6 +288,13 @@ pep621_dev_dependency_groups = [
278288 " packaging" ,
279289 " release" ,
280290]
291+ # torch and torchvision are listed explicitly in dev deps to allow
292+ # [tool.uv.sources] to redirect them to the CPU-only PyTorch index,
293+ # but they are not directly imported in the vws-cli source code.
294+ per_rule_ignores.DEP002 = [
295+ " torch" ,
296+ " torchvision" ,
297+ ]
281298
282299[tool .pyproject-fmt ]
283300indent = 4
You can’t perform that action at this time.
0 commit comments