Use CPU-only PyTorch index to speed up dev installation#1967
Merged
adamtheturtle merged 1 commit intomainfrom Feb 18, 2026
Merged
Use CPU-only PyTorch index to speed up dev installation#1967adamtheturtle merged 1 commit intomainfrom
adamtheturtle merged 1 commit intomainfrom
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
vws-python-mock(a dev dependency) transitively requirestorchandtorchvisionuvresolves these from PyPI which provides CUDA-enabled wheels on Linux (~916 MB fortorchalone)torchandtorchvisionto the CPU-only PyTorch indexDoes it actually make installation faster?
Yes — tested empirically (in VWS-Python/vws-python#2857):
torch(Linux, cp313)torchvision(Linux, cp313)~733 MB total reduction per cold-cache install on Linux CI runners.
Implementation notes
[tool.uv.sources]only applies to direct dependencies (not transitive ones), sotorchandtorchvisionmust be listed explicitly inoptional-dependencies.devfor the source override to take effect. Adeptryignore is added since these packages are not directly imported in thevws-clisource code.Note
Low Risk
Dependency/lockfile-only changes; main risk is unexpected dev environment resolution differences across platforms due to new index and platform markers.
Overview
Speeds up dev installs by explicitly adding
torchandtorchvisiontooptional-dependencies.devand configuringuv([tool.uv]) to source them from the PyTorch CPU-only wheel index instead of PyPI.Updates dependency tooling to match this setup: adds
deptryignores for the now-explicit-but-not-imported deps, refreshesuv.lockto use platform-specific CPU wheels (dropping CUDA/NVIDIA-related packages), and bumpspyreflyplusvws-python-mockto newer versions.Written by Cursor Bugbot for commit 8417eae. This will update automatically on new commits. Configure here.