abc_runner.pool_runner¶
WARNING
This documentation is almost entirely "vibe coded"; while a helpful resource for humans and agents to understand this codebase, it should not be considered a source of ground truth in the way documentation normally is, and the user is responsible for verifying that all instructions given here are safe.
abc_runner.pool_runner
¶
Parallel, resumable execution of many benchmark attempts via an agent pool.
A batch of benchmarks is the cross-product of matched task refs and the number
of attempts requested per task: each (task_ref, attempt) pair is one job.
Jobs are handed to an :mod:automaton.pool pool, which dispatches them (serially
in-process, or across MPI ranks) and gathers results.
Resumability is intrinsic to the attempt formalism: a batch targets exactly N
attempts per task. An attempt whose result is conclusive (PASS/FAIL)
is complete and kept; an attempt that is missing or ended inconclusively
(endpoint/harness/internal error, or never ran) is deleted and re-run — but the
batch never exceeds N attempts per task. There is no separate "redo" concept.
Result artifacts are written by :class:abc_runner.runner.BenchmarkRunner into
the organized results archive (a per-attempt attempt_NN subdirectory when
N > 1), not into the pool's checkpoint directories. The pool's checkpoint root
holds only its aggregated manifest.jsonl; completion is judged from
abc_runner's own metadata.json (via attempt_is_complete), so
write_marker is disabled and custom done_check/clean_job hooks drive
resume.
AttemptJob
dataclass
¶
Payload describing one (task_ref, attempt) benchmark attempt.
Attributes:
| Name | Type | Description |
|---|---|---|
task_ref |
str
|
Canonical |
attempt |
int
|
1-based attempt index for this task. |
attempts |
int
|
Total attempts requested per task in this batch. |
BenchmarkPoolRunner
¶
BenchmarkPoolRunner(config: Config, resolver: GroupResolver, *, agent_id: str, results_dir: Path | None, timeout: int | None, runner_kwargs: dict[str, Any] | None = None)
Run a batch of benchmark attempts over an agent pool.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
config
|
Config
|
As for :class: |
required |
resolver
|
Config
|
As for :class: |
required |
agent_id
|
str
|
Agent to run every job with. |
required |
results_dir
|
Path | None
|
Organized results archive root (or from config/env). Per-attempt directories are created beneath it. |
required |
timeout
|
int | None
|
Per-benchmark timeout forwarded to each run. |
required |
runner_kwargs
|
dict
|
Extra keyword args forwarded to each :class: |
None
|
Source code in abc_runner/pool_runner.py
make_pool
¶
make_pool(jobs: list[AttemptJob], checkpoint_root: Path, *, use_mpi: bool) -> AgentPool
Construct the pool that will execute jobs.
The pool judges completion from abc_runner's own per-attempt results (not
a DONE.json marker) and cleans an incomplete attempt directory before
re-running it.
Source code in abc_runner/pool_runner.py
164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 | |
build_attempt_jobs
¶
build_attempt_jobs(task_refs: list[str], attempts: int) -> list[AttemptJob]
Expand task refs into the cross-product of (task_ref, attempt) jobs.
Jobs are ordered task-major then attempt-major, but the pool may dispatch them in any order.
Source code in abc_runner/pool_runner.py
build_required_containers
¶
build_required_containers(config: Config, resolver: GroupResolver, agent_id: str, task_refs: list[str]) -> None
Build every runtime container required by task_refs for agent_id.
Called on every rank before an MPI pool dispatches, so each node has its (node-local) container image ready. Serial runs call it once. Building is not parallel-safe within a node, so callers must not invoke this concurrently on the same host.