Skip to content

Run LLM benchmark models in parallel (+ configurable --benchmark-parallel)#76

Open
dalmia wants to merge 2 commits into
mainfrom
pr-llm-benchmark-parallel
Open

Run LLM benchmark models in parallel (+ configurable --benchmark-parallel)#76
dalmia wants to merge 2 commits into
mainfrom
pr-llm-benchmark-parallel

Conversation

@dalmia

@dalmia dalmia commented Jun 10, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Refactor the agent-connection LLM benchmark path to reuse run_benchmark_cli so models run in parallel with a shared logfile, leaderboard, and consolidated summary (previously one model at a time).
  • Add configurable benchmark-level parallelism for LLM: --benchmark-parallel flag and CALIBRATE_LLM_BENCHMARK_PARALLEL env var, resolved via resolve_benchmark_parallel (flag > env > default 2).

Changes

  • calibrate/llm/_output.py, calibrate/llm/__init__.py, calibrate/llm/benchmark.py: parallel model runner + run_benchmark_cli scaffolding.
  • calibrate/utils.py: resolve_benchmark_parallel + DEFAULT_BENCHMARK_PARALLEL.
  • calibrate/cli.py: agent-path refactor + LLM --benchmark-parallel wiring.
  • Tests: tests/llm/test_benchmark.py, tests/llm/test_init_extra.py, tests/test_cli.py.

Test plan

  • uv run pytest tests/llm/test_benchmark.py tests/llm/test_init_extra.py tests/test_cli.py

Note: shares the resolve_benchmark_parallel addition in utils.py with the STT/TTS benchmark-parallel PR; whichever merges second needs a trivial rebase.

Made with Cursor

Refactor the agent-connection LLM benchmark to reuse run_benchmark_cli so
models run in parallel (tee'd per-run logs, shared leaderboard/summary), and
add a --benchmark-parallel flag / CALIBRATE_LLM_BENCHMARK_PARALLEL env var
(precedence: flag > env > default 2) via resolve_benchmark_parallel.

Co-authored-by: Cursor <cursoragent@cursor.com>
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

main() now drives models through _run_models via run_benchmark_cli, so the
TestLLMBenchmarkMain tests must patch _run_models (returning the {model:
result} mapping) instead of the now-unused run() wrapper. Restores error-path
SystemExit detection.

Co-authored-by: Cursor <cursoragent@cursor.com>
@codecov

codecov Bot commented Jun 10, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 95.18072% with 4 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
calibrate/llm/_output.py 91.89% 3 Missing ⚠️
calibrate/cli.py 80.00% 1 Missing ⚠️

📢 Thoughts on this report? Let us know!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant