Skip to content

(1/n) Refactor benchmark execution behind a shared runner interface - #79

Draft
kargibora wants to merge 1 commit into
mainfrom
refactor/benchmark-runner-main
Draft

(1/n) Refactor benchmark execution behind a shared runner interface#79
kargibora wants to merge 1 commit into
mainfrom
refactor/benchmark-runner-main

Conversation

@kargibora

Copy link
Copy Markdown
Collaborator

This PR is one of the large refactors that is discussed, for implementing more proper task definition in which task is defined as a .yaml files that calls certain functions with set of values (like dataset revision, dataset...).

Summary

The current generate-and-evaluate flow is implemented directly inside generate_and_evaluate.py. Besides running
pairwise evaluation, this module is also responsible for selecting the workflow, resolving task baselines, constructing
generation settings, and initializing the judge.

This works for the current benchmarks, but adding a benchmark with a different execution flow would require adding more
task-specific conditions to the same module. The goal of this PR is to introduce a small runner abstraction before
adding further benchmark integrations.

What changed

This PR adds a BenchmarkAdapter contract that connects supported tasks to a benchmark runner. The existing pairwise
evaluation remains the only registered implementation and acts as the fallback, so the runtime behavior of existing
tasks is preserved.

The following responsibilities were also extracted from generate_and_evaluate.py:

  • Native baseline definitions and lookup now live in judgearena/baselines.py.
  • Shared generation argument construction lives in judgearena/benchmark.py.
  • Judge model construction is shared between benchmark runners.
  • ELO and pairwise evaluation now use the same generation configuration logic.
  • The existing pairwise workflow is exposed as run_pairwise() and selected through the adapter registry.

The execution path is now:

CLI configuration
    -> benchmark adapter resolution
    -> selected benchmark runner
    -> generation and evaluation

Extract shared baseline and model setup while keeping the existing pairwise workflow as the only registered adapter.
@kargibora kargibora closed this Jul 22, 2026
@kargibora kargibora reopened this Jul 23, 2026
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