abc_runner.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.runner
¶
Benchmark orchestration for ABC Runner.
The heavy lifting of sandboxed execution lives in :mod:automaton. This module
orchestrates a benchmark run on top of it:
- resolve the task, agent, harness, and runtime container,
- stage the workspace, prompt, and harness assets into a per-run directory,
- run the task's
build_env.shinside the container, - run the agent via :meth:
automaton.Sandbox.run_agent(deliverable is left in the workspace), - run the task's hidden verification inside the container,
- compute PASS/FAIL, replace the full workspace with a delta against the
task (the compressed result format, see :mod:
abc_runner.result_format), and writeresult.json,metadata.json, andusage.json.
BenchmarkResult
¶
BenchmarkResult(task_id: str, task_group: str, task_ref: str, agent_id: str, harness_id: str, model_names: list[str], status: str, result_dir: Path, verify_log: str | None = None, error: str | None = None, failure_phase: str | None = None, usage_summary: dict[str, Any] | None = None, model_apis: list[str | None] | None = None)
Result of a benchmark run.
Source code in abc_runner/runner.py
BenchmarkRunner
¶
BenchmarkRunner(config: Config, resolver: GroupResolver, dry_run: bool = False, stream_output: bool = True, clean_env: bool = True, harness_memory_limit_bytes: int | None = None, harness_memory_limit_fraction: float | None = 0.9, sandbox_network: bool | None = None, keep_workspace: bool = False)
Orchestrates benchmark execution on top of :class:automaton.Sandbox.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
config
|
Config
|
Configuration object. |
required |
resolver
|
GroupResolver
|
Task-group resolver (CLI |
required |
dry_run
|
bool
|
If True, print commands without executing. |
False
|
stream_output
|
bool
|
If True, mirror container output to terminal. |
True
|
clean_env
|
bool
|
If True, remove task environment after verification. |
True
|
harness_memory_limit_bytes
|
int
|
Fixed harness memory cap in bytes. |
None
|
harness_memory_limit_fraction
|
float
|
Fraction of available memory to cap harness at. Default 0.9. |
0.9
|
sandbox_network
|
bool
|
Override loopback-only sandbox networking; defaults to the config value. |
None
|
Examples:
Source code in abc_runner/runner.py
run
¶
run(task_id: str, agent_id: str, task_group: str | None = None, timeout: int | None = None, results_dir: Path | None = None, output_dir: Path | None = None, attempt: int | None = None, attempts: int = 1) -> BenchmarkResult
Run a single benchmark and return its :class:BenchmarkResult.
When attempts > 1 the run is stored under a per-attempt subdirectory
(.../<task>/attempt_NN/<timestamp>_<agent>_<task>/); attempt is
the 1-based index of this attempt. A single attempt (the default) keeps
the flat .../<task>/<timestamp>_<agent>_<task>/ layout unchanged.
These only apply to the organized results_dir layout, not to a
standalone output_dir.
Source code in abc_runner/runner.py
314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 | |
attempt_is_complete
¶
Return True iff attempt_dir holds a conclusive, finished benchmark.
A complete attempt has a readable metadata.json whose complete flag
is true (equivalently, a conclusive status). Missing, unreadable, or
inconclusive results are treated as incomplete so a resume re-runs them.