Skip to content

(2/n) Organize Benchmark Execution Into Responsibility-Owned Packages - #80

Open
kargibora wants to merge 3 commits into
mainfrom
refactor/benchmark-packages-main
Open

(2/n) Organize Benchmark Execution Into Responsibility-Owned Packages#80
kargibora wants to merge 3 commits into
mainfrom
refactor/benchmark-packages-main

Conversation

@kargibora

Copy link
Copy Markdown
Collaborator

Summary

The previous PR introduced a shared benchmark runner interface, but benchmark implementations and related utilities are still distributed across the root of judgearena.

For example, pairwise evaluation, ELO execution, MT-Bench, datasets, and run metadata currently live in unrelated root-
level modules. This makes ownership unclear and increases the number of unrelated files that must be changed when adding or modifying a benchmark.

This PR reorganizes the existing implementation into responsibility-owned packages and moves benchmark dispatch out of the pairwise runner.

Take a look at SoP to understand the reason and shortcomings of the current approach.

What changed

Benchmark implementations are now grouped under:

judgearena/benchmarks/
├── elo/
├── mt_bench/
├── pairwise/
├── execution.py
├── registry.py
└── runner.py

Other shared components are also separated:

judgearena/
├── artifacts/
│   ├── metadata.py
│   └── run.py
└── datasets/
    ├── arena_hard.py
    ├── m_arenahard.py
    └── mt_bench.py

Important changes include:

  • Moves pairwise, MT-Bench, and ELO implementations into dedicated packages.
  • Adds a benchmark-owned registry and thin shared dispatcher.
  • Keeps the CLI responsible only for configuration and top-level dispatch.
  • Separates ELO rating calculations from the ELO execution workflow.
  • Centralizes result-directory creation and safe metadata writing.
  • Moves dataset loading utilities under judgearena/datasets.
  • Updates imports and tests to follow the new package ownership.

Most of the diff consists of file moves and import updates. Existing benchmark protocols, prompts, configuration, and
evaluation behavior are preserved.

Why this helps

A benchmark can now own its runner and utilities without adding more logic to the pairwise implementation or the package
root. It also gives datasets and artifacts stable locations that can be reused by future benchmark integrations.

Notes

  • As can be seen on diffs, most of the LoC coming from moving codes from certain scripts so each script is more readable and does one job.

@kargibora kargibora closed this Jul 22, 2026
@kargibora kargibora reopened this Jul 23, 2026

@geoalgo geoalgo left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, I have only minor comments.

Comment thread judgearena/artifacts/run.py Outdated
Comment on lines +18 to +21
def slugify(value: str) -> str:
"""Return a filesystem-safe model, task, or benchmark name."""
slug = re.sub(r"[^a-z0-9]+", "-", value.lower()).strip("-")
return slug or "value"

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not sure about the name (I only vaguely could guess from the name).
Given that we will have it at a bunch of place perhaps we can choose a more telling name like safe_string? or safe_filename?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree. Slugify is a technical term for generating a safe name from a string with spaces however we dont have to set it up like that. safe_filename sounds better to me

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

61e23f2 renames the function to safe_filename

Comment thread judgearena/artifacts/run.py
@kargibora
kargibora marked this pull request as ready for review August 4, 2026 09:33
@kargibora
kargibora force-pushed the refactor/benchmark-packages-main branch from 61e23f2 to 4cefd83 Compare August 4, 2026 11:16
Base automatically changed from refactor/benchmark-runner-main to main August 5, 2026 13:32
Move existing implementations into responsibility-owned packages without changing benchmark behavior.
Route generate-and-evaluate tasks through a dedicated registry and thin shared runner.
Clearer name for the filesystem-safe string helper used across benchmark
runners, per review.
@geoalgo
geoalgo force-pushed the refactor/benchmark-packages-main branch from 4cefd83 to ab0e602 Compare August 5, 2026 13:32

@geoalgo geoalgo left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, we just need to fix ruff / CI before merging, feel free to merge once this is done.

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.

2 participants