From 1778cb77fa80c25c4021d61f2d223b2c344f82f6 Mon Sep 17 00:00:00 2001 From: zili-amd Date: Mon, 19 Oct 2026 19:15:59 -0700 Subject: [PATCH 1/4] Provision the Forge engine in the Docker runner and run one command in it A forge run config now gets what a GEAK run gets: its agent backend's CLI (Claude unless the run sets agent_backend: codex), the pinned Hyperloom checkout named by HYPERLOOM_ROOT mounted read-only, and Claude credentials forwarded by name. `make docker-setup-forge` installs Hyperloom[forge] from an exported copy of that checkout's committed HEAD into the host-mounted user base, records the installed revision, and skips an unchanged one; the container bootstrap prepends that engine only for Forge runs. Other agents never receive the checkout, and setup-forge receives no credentials. `docker_benchmark.sh exec ` runs one command non-interactively in the runtime container, and ANTHROPIC_CUSTOM_HEADERS is forwarded with the other Anthropic variables to GEAK and Forge containers. Co-authored-by: Cursor --- Makefile | 8 +- agents/forge/README.md | 21 ++++- docs/how-to/run-evaluation.md | 7 ++ src/scripts/docker_benchmark.sh | 137 +++++++++++++++++++++++++++++--- tests/test_docker_benchmark.sh | 130 ++++++++++++++++++++++++++++++ 5 files changed, 291 insertions(+), 12 deletions(-) diff --git a/Makefile b/Makefile index ff8577aa6..7b82ba9df 100755 --- a/Makefile +++ b/Makefile @@ -6,7 +6,7 @@ SHELL := /bin/bash -.PHONY: help docker-shell docker-check-agents docker-smoke docker-build-rdna4 docker-run docker-parallel-run docker-quality-loop docker-sikl-task-builder docker-setup-flydsl docker-setup-geak \ +.PHONY: help docker-shell docker-check-agents docker-smoke docker-build-rdna4 docker-run docker-parallel-run docker-quality-loop docker-sikl-task-builder docker-setup-flydsl docker-setup-geak docker-setup-forge \ slurm-shell slurm-smoke slurm-parallel-smoke slurm-check-agents slurm-run slurm-parallel-run slurm-submit slurm-parallel-submit \ check-docker-runner check-slurm-runner check-evaluator check-held-out check-visualization \ visualization-build visualization-serve visualization-run \ @@ -34,6 +34,7 @@ help: @echo " Use SIKL_BUILDER_ARGS='resume --run-id ...' to resume" @echo "make docker-setup-flydsl - Install FlyDSL when absent (for flydsl2flydsl, torch2flydsl, and triton2flydsl)" @echo "make docker-setup-geak - Install the Claude Agent SDK when absent (for the geak agent)" + @echo "make docker-setup-forge - Install Hyperloom[forge] from HYPERLOOM_ROOT's HEAD (for the forge agent)" @echo "make check-docker-runner - Check Docker runner syntax and runtime-specific arguments" @echo "make check-slurm-runner - Check Slurm/Spur resource and Docker handoff arguments" @echo "" @@ -170,6 +171,11 @@ docker-setup-flydsl: docker-setup-geak: @$(DOCKER_RUNNER) setup-geak +# Install Hyperloom[forge] from the committed HEAD of HYPERLOOM_ROOT into the +# mounted pip user-base. Run and preflight repeat it when that revision changes. +docker-setup-forge: + @$(DOCKER_RUNNER) setup-forge + check-docker-runner: @bash tests/test_docker_benchmark.sh diff --git a/agents/forge/README.md b/agents/forge/README.md index cd5a475a9..f424cf20a 100644 --- a/agents/forge/README.md +++ b/agents/forge/README.md @@ -318,10 +318,27 @@ checks that both commands still take the options the adapter builds. only as a library. It refuses anything else. Upstream owns its GPU DSL/compiler support and SDKs. Install the `forge` extra in -the GPU runtime environment (it also pulls the agent SDK dependencies): +the GPU runtime environment (it also pulls the agent SDK dependencies). Through +Docker, name the pinned checkout on the host: + +```bash +HYPERLOOM_ROOT=/path/to/Hyperloom make docker-setup-forge +HYPERLOOM_ROOT=/path/to/Hyperloom make docker-run CONFIG= +``` + +For `forge` runs the runner mounts `HYPERLOOM_ROOT` read-only, provisions the +agent backend's CLI and authentication (Claude Code unless the run sets +`agent.agent_backend: codex`), forwards Claude credentials by name as for GEAK, +and prepends `.aka-pyuserbase/forge-engine/` to `PYTHONPATH`, +since an image upgrade can change the Python ABI. Setup installs the +committed `HEAD` of `HYPERLOOM_ROOT` there with `pip install --target`, from an +exported copy because setuptools builds in tree. It records the revision in +`.aka-hyperloom-revision` and warns that uncommitted changes are not installed. +Run and preflight repeat the install only when that revision changes, then +require `agents/forge/engine.py --arena-probe` to pass. Outside Docker, install +into the interpreter directly: ```bash -# HYPERLOOM_ROOT names the separately mounted/pinned checkout in the container. python3 -m pip install "${HYPERLOOM_ROOT}[forge]" python3 agents/forge/engine.py --arena-probe ``` diff --git a/docs/how-to/run-evaluation.md b/docs/how-to/run-evaluation.md index a21fc858e..a6010f2e0 100644 --- a/docs/how-to/run-evaluation.md +++ b/docs/how-to/run-evaluation.md @@ -110,6 +110,13 @@ For debugging, enter the same Docker runtime used by the experiment: make docker-shell ``` +To run one command non-interactively in that runtime, without provisioning an +agent CLI or forwarding credentials (for example, a baseline-only measurement): + +```bash +AKA_VISIBLE_GPU=0 bash src/scripts/docker_benchmark.sh exec python3