18 Commits

Author SHA1 Message Date
sora
e9e3230e46 swe_agentic: auto-release pulled images at process exit
Per-instance images are 1-4GB each; a --limit 10 run pulls up to 10 of
them and previously stranded the whole footprint on Ctrl+C/exit. Every
image THIS process pulls is now registered and released by an atexit
hook (containers first, then rmi) -- images that already existed
locally are never touched. EVALHARNESS_KEEP_SWE_IMAGES=1 opts out for
prefetch-style runs that want to keep them.

Co-Authored-By: Claude <noreply@anthropic.com>
2026-09-18 09:03:17 +00:00
sora
f09fe184fe swe_agentic: ensure per-instance image before docker run
docker run's implicit pull prints nothing and the 120s start timeout
kills runs on slow mirrors; ensure_image brings the progress display,
mirror chain and watchdog to per-instance pulls (each sample = its own
image, 10 samples = 10 pulls).

Co-Authored-By: Claude <noreply@anthropic.com>
2026-09-18 08:54:30 +00:00
sora
a93996094d swe_agentic: sentinel patch must end with a newline
The captured diff was stripped, and git apply rejects diffs whose last
line lacks a trailing newline ('corrupt patch at line N') -- the first
agentic score was resolved=0 with patch_apply_failed despite a correct
fix. Verified: same payload + newline applies clean in the official
container.

Co-Authored-By: Claude <noreply@anthropic.com>
2026-09-18 08:22:59 +00:00
sora
2a2335f842 swe_agentic: accept adapter kwarg in __init__ (get_env uniform signature)
Without it get_env('swe_agentic') raised TypeError at env creation --
and the swallowed exception silently degraded the run to SINGLE-TURN
prose generation (421s of model monologue, no container, empty
trajectory). This was the agentic 'run' that looked like it worked.

Co-Authored-By: Claude <noreply@anthropic.com>
2026-09-18 04:01:48 +00:00
sora
f662006517 swe_bench_verified_agentic: multi-turn SWE agent (mini-swe-agent protocol)
Ports es's swe_bench_agentic_adapter into our plugin architecture:
- env swe_agentic: per-sample LONG-RUNNING container (official sweb
  image, /testbed, bash -lc like the testbed startup files expect),
  single bash tool via function calling, sentinel-submission protocol
  (COMPLETE_TASK_AND_SUBMIT_FINAL_OUTPUT + patch), git-diff fallback;
  observations capped at 30k chars
- dataset swe_bench_verified_agentic: same princeton source/converter,
  separate bench name so both variants coexist
- recipe: recovered patch + OFFICIAL test_patch applied in-container,
  FAIL_TO_PASS + capped PASS_TO_PASS via conda testbed pytest, 1800s
- config: max_turns 250, env swe_agentic

Single-turn swe_bench_verified is untouched.

Co-Authored-By: Claude <noreply@anthropic.com>
2026-09-18 02:29:35 +00:00
sora
15b1574857 tau2: module-level silencing (order-independent)
Function-level silencers kept losing the race to whichever 'import
tau2.*' fired first in the process. The filter + TAU2_DATA_DIR now
install when the env registry loads the plugin, strictly before any
tau2 import can happen anywhere.

Co-Authored-By: Claude <noreply@anthropic.com>
2026-09-17 09:21:16 +00:00
sora
a69cea2b76 tau2: ERROR+ log level; TAU2_DATA_DIR kills the data-dir banners
The startup noise (.env found note, data directory note) is itself
WARNING-level, so the WARNING filter passed it through. Level is now
ERROR and the data-dir warnings die at the source with the correct
TAU2_DATA_DIR.

Co-Authored-By: Claude <noreply@anthropic.com>
2026-09-17 09:19:01 +00:00
sora
30af23212e tau2: silence loguru BEFORE the first tau2 import
Co-Authored-By: Claude <noreply@anthropic.com>
2026-09-17 09:14:57 +00:00
sora
b62088997d tau2: floor max_turns at 40 (runner's generic 8 starved every sim)
Both reward-0 runs died with 'Termination reason: max_steps' after 3-4
exchanges -- the runner passes its generic default (8) down, far too
few for greet->verify->find->policy->act->confirm. Official tau2 runs
use 40+; floor, don't cap.

Co-Authored-By: Claude <noreply@anthropic.com>
2026-09-17 09:10:32 +00:00
sora
fa60065099 tau2: silence per-message DEBUG floods; is_final_chunk only when done
loguru restricted to WARNING+ (every orchestrator step dumped full
messages -- thousands of lines per bench). AssistantMessage.is_final_
chunk now False on tool-call turns (official adapter semantics: True
means the agent is FINISHED talking); always-True handed the turn
back to the user prematurely mid-action-sequence.

Co-Authored-By: Claude <noreply@anthropic.com>
2026-09-17 09:07:53 +00:00
sora
d244d1a435 tau2 bridge: strip </think> leakage from simulator output
The user simulator (GLM via our adapter) inlines its scenario reasoning
in content as '...instructions...</think>reply' -- passed through
unstripped, the AGENT receives the scenario's secret instructions
(task goal, disclosure strategy), inflating rewards. Both channels now
trimmed at the last </think>.

Co-Authored-By: Claude <noreply@anthropic.com>
2026-09-17 09:03:52 +00:00
sora
bcb2128b02 tau2 env: auto-install the engine (local checkout -> GitHub), manual fallback
Same UX as the docker image chain: try local sources first, then the
GitHub URL, and on total failure print the exact manual commands --
with a warning that PyPI's 'tau2' is an unrelated physics package.

Co-Authored-By: Claude <noreply@anthropic.com>
2026-09-17 08:56:48 +00:00
sora
27cf8b3c7e Usability round: progress plugin, CLI provider flags, top-level run(), vendored BFCL checker
- progress/: Rich per-sample terminal progress plugin (Run Plan panel,
  in-flight/rate/ETA bar); shared console + log-through-live to avoid
  interleaved writes, rollback() pairs begin_sample on the retry path,
  begin moved inside the semaphore (in-flight = actually generating),
  graceful degradation when rich is absent
- cli.py: --provider/--api-url/--model composition (openai-chat |
  openai-pool), --disable-thinking/--perf/--textools as first-class
  flags, per-bench phase lines and done/failed result lines
- __init__: top-level run()/arun() entries (event-loop safe for notebooks)
- third_party/bfcl: vendored official BFCL ast_checker + type mappings
  (Apache-2.0, provenance in __init__.py); imports rerouted locally,
  underscore_to_dot parameterized; verified bit-identical with the
  bfcl-eval package on 100 real rows -- removes the heavy extra
  (pinned numpy + cloud SDK wall) from the install path
- runner: progress/status hooks through generate+evaluate, checkpoint
  key scheme fix (empty-store falsy bug), tiered retry backoff,
  multi-segment pool {range} expansion fix, adapter-instance passthrough
- pyproject: tree_sitter family joins core deps; [bfcl] extra retired
- README: rewritten (zh) -- install/quickstart/flags reference/bench
  table/reliability/extension/architecture/validation

Co-Authored-By: Claude <noreply@anthropic.com>
2026-09-10 05:46:45 +00:00
sora
46bef7d3dd dp4-flash 28-bench alignment: renderer plugin layer, exec_workers, gen_profiles, AIMD pool, BCB/LCB/bfcl/gfc judge fixes
Co-Authored-By: Claude <noreply@anthropic.com>
2026-09-08 05:55:04 +00:00
111336cbee ladder20 complete 28/28 (Qwen3-8B pool): fixes en route — tau2 off-loop executor, double-encoded tool args, shared adapter cache; swe real-model 0.0 (oracle path verified 1.0) 2026-08-26 10:37:54 +00:00
78459c974e tau2 via OFFICIAL engine: self-running env plugin (run_task hook + needs_adapter generic dispatch, no name hardcoding), deep generate() patch, official ToolCall shape, data plugin keeps verbatim Task json, official reward scoring; checkpoint plugin (per-sample resume) + summary csv with time/categories 2026-08-25 11:06:08 +00:00
a32d902e94 Comparison-driven fixes: MCQ choices in prompt + letter contract, Answer: suffix for QA, markdown answer cleaning, trivia_qa answer_phrase priority, DROP gold-as-alternatives (OR) official semantics, retry on 5xx, numpy/scipy compat 2026-08-24 15:48:42 +00:00
b2e7133b20 Add sandbox layer (docker exec hard-isolation + serve envs, refcounted acquire/release, atexit teardown, bind-mount sharing) and agent evaluation driver (message pump drive(), Trajectory, bfcl_mock env with official call-sequence scoring, mock:fc oracle); Deployer delegates to sandbox.serve_env; code_any extractor fixes indentation-stripping; CLI --env 2026-08-24 07:11:03 +00:00