Skip to content

Use CPU-only PyTorch index to speed up dev installation#1556

Merged
adamtheturtle merged 1 commit intomainfrom
chore/pytorch-cpu-index
Feb 18, 2026
Merged

Use CPU-only PyTorch index to speed up dev installation#1556
adamtheturtle merged 1 commit intomainfrom
chore/pytorch-cpu-index

Conversation

@adamtheturtle
Copy link
Member

@adamtheturtle adamtheturtle commented Feb 18, 2026

Summary

  • vws-python-mock (a dev dependency) transitively requires torch and torchvision
  • By default, uv resolves these from PyPI which provides CUDA-enabled wheels on Linux (~916 MB for torch alone)
  • This PR follows the faster installation guide to redirect torch and torchvision to the CPU-only PyTorch index

Does it actually make installation faster?

Yes — tested empirically (in VWS-Python/vws-python#2857):

Package CUDA wheel (PyPI) CPU-only wheel Saving
torch (Linux, cp313) 916 MB 189 MB 727 MB
torchvision (Linux, cp313) 8 MB 2 MB 6 MB

~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), so torch and torchvision must be listed explicitly in optional-dependencies.dev for the source override to take effect. A deptry ignore is added since these packages are not directly imported in the vws-auth-tools source code.


Note

Low Risk
Dependency/config-only change affecting developer environment installs; no runtime or security-sensitive logic is modified.

Overview
Speeds up dev installs by explicitly adding torch/torchvision to optional-dependencies.dev and configuring uv to resolve them from the CPU-only PyTorch index ([tool.uv]), avoiding large CUDA wheels from PyPI.

Adds a deptry ignore (DEP002) for these newly-explicit dev deps since they’re not directly imported by vws-auth-tools.

Written by Cursor Bugbot for commit e86b768. This will update automatically on new commits. Configure here.

@adamtheturtle adamtheturtle enabled auto-merge (squash) February 18, 2026 12:51
@adamtheturtle adamtheturtle merged commit 757272e into main Feb 18, 2026
16 checks passed
@adamtheturtle adamtheturtle deleted the chore/pytorch-cpu-index branch February 18, 2026 12:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant