Files
jepa-fx-risk/.gitea/workflows/autoresearch.yml
T
mathias 8539ec3a85
CD / Lint / Test / Vet (push) Failing after 2s
CD / Deploy via GitOps (push) Has been skipped
CD / Build & Import (push) Has been skipped
fix(ci): install torch from cu130 index in venv step
train.py imports torch but the venv step only installed requirements.txt,
which deliberately excludes torch (must come from the cu130 wheel index for
koala's Blackwell sm_120, per the requirements.txt header). Baseline run died
with ModuleNotFoundError: No module named 'torch'. Add the documented install.
2026-06-29 19:14:51 +00:00

77 lines
2.5 KiB
YAML

name: Autoresearch Loop
on:
workflow_dispatch:
inputs:
fixture:
description: 'Fixture name in fixtures/ (without .json)'
required: true
default: 'phase-a-toy'
rq_id:
description: 'Run ID — defaults to fixture name if blank'
required: false
default: ''
iters:
description: 'Max iterations'
required: false
default: '3'
model:
description: 'LiteLLM model override (leave blank for default berget/gemma4-31b)'
required: false
default: ''
jobs:
run:
name: Autoresearch — ${{ inputs.fixture }}
runs-on: self-hosted
timeout-minutes: 90
steps:
- uses: actions/checkout@v4
- name: Resolve run ID
id: vars
run: |
RQ_ID="${{ inputs.rq_id }}"
[ -z "$RQ_ID" ] && RQ_ID="${{ inputs.fixture }}"
echo "rq_id=$RQ_ID" >> "$GITHUB_OUTPUT"
- name: Clean stale run dir
run: rm -rf "runs/${{ steps.vars.outputs.rq_id }}"
- name: Set up Python venv
run: |
[ -d .venv ] || python3 -m venv .venv
# torch must come from the cu130 wheel index (koala Blackwell sm_120);
# requirements.txt deliberately excludes it. Install it first.
.venv/bin/pip install -q torch --index-url https://download.pytorch.org/whl/cu130
.venv/bin/pip install -q -r requirements.txt
- name: Scaffold run dir
run: |
.venv/bin/python scripts/autoresearch_start.py \
"fixtures/${{ inputs.fixture }}.json" \
"${{ steps.vars.outputs.rq_id }}"
- name: Run autoresearch loop
env:
LITELLM_KEY: ${{ secrets.LITELLM_KEY }}
LITELLM_BASE: ${{ secrets.LITELLM_BASE }}
NTFY_URL: ${{ secrets.NTFY_URL }}
LOOP_MODEL: ${{ inputs.model }}
run: |
ARGS="--run-dir runs/${{ steps.vars.outputs.rq_id }} --iters ${{ inputs.iters }}"
[ -n "${{ inputs.model }}" ] && ARGS="$ARGS --model ${{ inputs.model }}"
.venv/bin/python loop.py $ARGS
- name: Upload run artifacts
if: always()
uses: https://gitea.com/actions/upload-artifact@v3
with:
name: run-${{ steps.vars.outputs.rq_id }}-${{ github.run_number }}
path: |
runs/${{ steps.vars.outputs.rq_id }}/STATUS.md
runs/${{ steps.vars.outputs.rq_id }}/metrics.json
runs/${{ steps.vars.outputs.rq_id }}/program.md
retention-days: 30