Skip to content

fix(ci): use CPU-only torch wheel and rebase before daily push#30

Merged
jgamblin merged 1 commit into
mainfrom
fix/ci-cpu-only-torch
Apr 28, 2026
Merged

fix(ci): use CPU-only torch wheel and rebase before daily push#30
jgamblin merged 1 commit into
mainfrom
fix/ci-cpu-only-torch

Conversation

@jgamblin
Copy link
Copy Markdown
Collaborator

Summary

Three issues surfaced in CI after the dependency modernization landed:

  1. Tests and Monthly Tuning were failing with [Errno 28] No space left on device during pip install -r requirements.txt. Root cause: torch's default PyPI wheel ships the full CUDA runtime (~5 GB across nvidia-cublas-cu12, nvidia-cudnn-cu12, nvidia-cusparselt-cu12, etc.). Runners don't have GPUs, so the CUDA payload is pure waste — and combined with darts[all] + scipy + statsmodels, the install exceeded the runner's disk budget.

  2. Monthly Tuning had a pre-install shim (pip install torch ... --index-url https://download.pytorch.org/whl/cpu before the -r requirements.txt line) that stopped working because the subsequent requirements install upgraded torch back to the PyPI CUDA wheel.

  3. Daily forecast push occasionally failed with a git fast-forward reject race when another commit landed between clone and push.

Changes

Test plan

  • CI on this PR: Tests (test.yml) and Lint pass.
  • After merge: next scheduled CVE Forecast Daily Update run succeeds.
  • Next monthly tuning run (or a manual workflow_dispatch) succeeds.

Notes

The --extra-index-url directive in requirements.txt applies to all environments — local dev will also pull CPU torch on fresh installs. That's the intended behavior (project doesn't target GPU execution), but flagging so anyone using a GPU-enabled venv knows to install torch separately first.

🤖 Generated with Claude Code

GitHub runners don't have GPUs, but torch's default PyPI wheel ships the
full CUDA runtime (~5 GB) and was exhausting the runner disk during pip
install on Tests and Monthly Tuning workflows.

- requirements.txt: add --extra-index-url for the PyTorch CPU wheel
  index so every environment (CI + local) picks the slim CPU build.
- monthly_tuning.yml: drop the pre-install shim — no longer needed now
  that requirements.txt resolves torch CPU directly.
- main.yml: add `git pull --rebase origin main` before the daily push
  to avoid race conditions when another commit lands between clone and
  push (mirrors what monthly_tuning.yml already does).

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@jgamblin jgamblin merged commit 02101ed into main Apr 28, 2026
2 checks passed
@jgamblin jgamblin deleted the fix/ci-cpu-only-torch branch April 28, 2026 19:38
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