Autoresearch CI reinstalls torch (cu130) on every run — slow venv step #17

Open
opened 2026-06-29 21:37:04 +00:00 by mathias · 0 comments
Owner

Problem

autoresearch.yml's "Set up Python venv" step runs pip install torch --index-url .../cu130 + pip install -r requirements.txt every run. The [ -d .venv ] guard is meant to reuse the venv, but the self-hosted act_runner checks out into a fresh ~/.cache/act/<hash>/hostexecutor dir each run, so .venv never persists — torch (a large cu130 wheel) is re-downloaded and reinstalled every time. Runs spend several minutes here before any real work.

Options

  • Cache the venv (or just torch's wheel cache) at a stable host path outside the per-run hostexecutor dir, and point pip's cache / a prebuilt .venv there.
  • Bake a base image with torch+deps preinstalled and run the job in it (container: / prebuilt runner image).
  • Use a pip download cache dir on the runner host (PIP_CACHE_DIR at a stable path) so at least the wheel isn't re-downloaded.

Source: Autoresearch Loop bring-up, 2026-06-29. Low priority (correctness is fine), but every Phase-A run pays the tax.

## Problem `autoresearch.yml`'s "Set up Python venv" step runs `pip install torch --index-url .../cu130` + `pip install -r requirements.txt` every run. The `[ -d .venv ]` guard is meant to reuse the venv, but the self-hosted act_runner checks out into a **fresh `~/.cache/act/<hash>/hostexecutor` dir each run**, so `.venv` never persists — torch (a large cu130 wheel) is re-downloaded and reinstalled every time. Runs spend several minutes here before any real work. ## Options - Cache the venv (or just torch's wheel cache) at a stable host path outside the per-run hostexecutor dir, and point pip's cache / a prebuilt `.venv` there. - Bake a base image with torch+deps preinstalled and run the job in it (`container:` / prebuilt runner image). - Use a pip download cache dir on the runner host (`PIP_CACHE_DIR` at a stable path) so at least the wheel isn't re-downloaded. Source: Autoresearch Loop bring-up, 2026-06-29. Low priority (correctness is fine), but every Phase-A run pays the tax.
Sign in to join this conversation.
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: mathias/jepa-fx-risk#17