fix(ci): use CPU-only torch wheel and rebase before daily push#30
Merged
Conversation
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>
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
Three issues surfaced in CI after the dependency modernization landed:
Tests and Monthly Tuning were failing with
[Errno 28] No space left on deviceduringpip install -r requirements.txt. Root cause: torch's default PyPI wheel ships the full CUDA runtime (~5 GB acrossnvidia-cublas-cu12,nvidia-cudnn-cu12,nvidia-cusparselt-cu12, etc.). Runners don't have GPUs, so the CUDA payload is pure waste — and combined withdarts[all]+scipy+statsmodels, the install exceeded the runner's disk budget.Monthly Tuning had a pre-install shim (
pip install torch ... --index-url https://download.pytorch.org/whl/cpubefore the-r requirements.txtline) that stopped working because the subsequent requirements install upgraded torch back to the PyPI CUDA wheel.Daily forecast push occasionally failed with a git fast-forward reject race when another commit landed between clone and push.
Changes
requirements.txt— add--extra-index-url https://download.pytorch.org/whl/cpuat the top so every pip install (CI and local) resolves torch from the CPU wheel index. This fixes both Release v.03: Complete system refactor, new technical docs, and production-ready enhancements #1 and v.04: Model configuration updates and stability improvements #2 in one line..github/workflows/monthly_tuning.yml— remove the now-redundant pre-install shim..github/workflows/main.yml— addgit pull --rebase origin mainbefore the dailygit push, mirroring whatmonthly_tuning.ymlalready does.Test plan
Tests(test.yml) andLintpass.CVE Forecast Daily Updaterun succeeds.workflow_dispatch) succeeds.Notes
The
--extra-index-urldirective inrequirements.txtapplies 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