|
|
||
|---|---|---|
| .. | ||
| e1v2 | ||
| __init__.py | ||
| build_env_volume.sh | ||
| capture_patch.sh | ||
| CONTAMINATION_AUDIT.md | ||
| grade_pro.py | ||
| METHODOLOGY.md | ||
| pro_predictions.py | ||
| README.md | ||
| strip_gold_history.sh | ||
| task_order_pro_70.csv | ||
SWE-bench Pro Devtools
SWE-bench Pro is kept separate from standard SWE-bench because the colleague
materials target the SWE-bench_Pro-os evaluator and a Pro-specific patch JSON
handoff.
Files:
METHODOLOGY.mddocuments the capture and grading assumptions.capture_patch.shcaptures a task-repository patch with untracked text files, filters environment junk, drops binary blobs, and requires an explicit output path outside the Ouroboros repo.pro_predictions.pycreates Ouroboros-style prediction JSONL by runningcapture_patch.shfor prepared task repositories.grade_pro.pyinvokes the official Pro evaluator when--skip-runis not supplied, then aggregates official per-instance outputs. It intentionally remains official-output-only; the Ouroboros denominator ledger is emitted bypro_predictions.pyfor the prediction/capture phase.e1v2/contains the persistent-agent evolutionary harness: sequential Pro tasks with carried Ouroboros data/source volumes and native post-task evolution between tasks. It also offers an OPTIONAL, default-OFF pre-task evolution phase (run_pro.py --pretask-evolution; seee1v2/README.md§Pre-task evolution) — the baseline path is unchanged when the flag is absent.task_order_pro_70.csvrecords the 70-task order plus the frozen E0 baseline verdicts used for E1v2 comparisons.
The aggregation in grade_pro.py is not replacement scoring. The official Pro
eval output remains the source of truth.
pro_predictions.py writes the official prediction JSONL plus sidecars:
<predictions>.ledger.jsonlrecords every requested instance, including capture failures and empty patches.<predictions>.errors.jsonlrecords failed capture rows.<predictions>.run_manifest.jsonrecords source/model/output provenance.
capture_patch.sh deliberately keeps source/config fixes such as setup.py,
pyproject.toml, and lockfiles. It filters environment junk and binary blobs,
not broad config-like paths.
evolve_pro.py was removed after v6.26. It used external workspace tasks, which
structurally suppressed cross-task self-evolution in older Ouroboros releases.
Use e1v2/run_pro.py / e1v2/auto_run.py for evolutionary runs and
pro_predictions.py for frozen prepared-repo predictions.
Building the oboros-env volume (self-contained prerequisite for solve runs)
e1v2/run_pro.py mounts a read-only Docker volume oboros-env into each task image
at /opt/miniconda3/envs/oboros; that volume supplies the Python interpreter and
Ouroboros's third-party dependencies (the agent SOURCE is seeded separately into
/obo-repo and imported via PYTHONPATH, so the volume holds DEPENDENCIES ONLY).
build_env_volume.sh builds it self-contained from this repo's requirements-runtime.lock:
devtools/benchmarks/swe_bench_pro/build_env_volume.sh # idempotent; no-op if ready
devtools/benchmarks/swe_bench_pro/build_env_volume.sh --rebuild # force a clean rebuild
It creates a conda env directly at the volume prefix (self-contained, mountable into
arbitrary glibc jefzda/sweap-images task images) and builds for --platform linux/amd64
to match those images. Run it from a clean checkout (a dirty tree would bake uncommitted
edits' deps into the measured env). On macOS/Colima the source path must be under a
host-mounted directory (e.g. /Users/...), not /tmp.
Transport, resilience, and reward-hacking guards
- musl/Alpine images (install-in-image fallback). glibc images use the prebuilt
oboros-envvolume. For musl images (oboros-env-muslis unreliable — musllinux wheels for tree-sitter et al. are often missing),run_pro.pyinstead setsOBO_INSTALL_IN_IMAGE=1andentrypoint_pro.shinstalls Ouroboros into the task image at container start (venv from the mounted clean source,pip install -r requirements-runtime.lockwith a graceful tree-sitter fallback — code-intel degrades to string search, the solve still runs). This mirrors the Terminal-Bench installed-agent transport and removes the musl-skip class. - Crash/teardown resilience.
run_pro.pycapturespatch.diffand writes thetimeline.jsonl/predictions.jsonlrow before the post-solve teardown (volume dump + next image pull), and its docker cache-load/inspect ops are timed.auto_run.pyhas--task-wall-timeout(default 9000s): if one task overruns, it killsrun_pro+ theobopro-*container and continues — the captured patch is already on disk and recorded LEGIT, so a colima teardown stall no longer hangs the whole run or triggers a needless re-pull/re-solve. A completed task with an existing non-emptypatch.diffis RESUME-skipped (unless--reset-state). - Gold-history strip (issue #93, OPEN/unpatched). Public
jefzdaimages carry future git history, sogit show <fix>/git log --all/ tags can leak the gold solution.entrypoint_pro.shstrips it before the agent starts (detach atbase_commit, delete all other refs/tags/remotes, expire reflog,gc --prune=now); residual reachability is warn-only (OBO_STRIP_GOLD_HISTORY=0disables). Strip the history for any publishable comparison, or scores are inflated/incomparable. - Operator note: do not run a solve (
run_pro/auto_run) in parallel withgrade_pro.pyon the SAME colima/docker daemon — concurrent docker load is the contention that triggers teardown stalls. Use separate daemons or serialize solve and grade.
Single-task smoke
- Eval pipeline (no env volume needed): build a gold prediction from the evaluator's
helper_code/sweap_eval_full_v2.jsonlpatchfield and rungrade_pro.py. A gold patch must resolve (allFAIL_TO_PASS+PASS_TO_PASSpass). - Full solve:
build_env_volume.sh, thene1v2/run_pro.py --start 1 --limit 1 --baseline --reset-state --solve-model <model>, thengrade_pro.pyon the produced patch. - The Docker SDK used by the official evaluator ignores
docker context; on Colima setDOCKER_HOST=unix://$HOME/.colima/default/docker.sockforgrade_pro.py.