(3/n) Introduce declarative YAML task definitions - #81
Draft
kargibora wants to merge 4 commits into
Draft
Conversation
Define validated YAML task specifications with discovery commands and package AlpacaEval as the first task.
Use registered definitions for runner, baseline, prompt, and judge defaults while retaining fallbacks for unmigrated tasks.
Use task-declared source revisions and field mappings for instruction and pre-generated output tables.
Store compact task versions and resolved YAML hashes in run metadata without embedding the full definition.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Task-specific configuration is currently distributed across Python constants, dataset loaders, baseline mappings, prompt
registries, and runner conditions. Adding or changing a task therefore requires modifying several unrelated modules.
This PR introduces declarative YAML task definitions, inspired by the task packaging approach used by lm-evaluation-
harness.
AlpacaEval is migrated as the first packaged task. Existing benchmarks continue using their current fallback behavior
until they are migrated in later PRs.
Task definitions
A task YAML describes the stable contract of a benchmark:
The main sections are:
The protocol does not contain implementation code. It references registered components such as pairwise,
judgearena_tables, pairwise_preference, and pairwise_win_rate.
Main components
The new task package contains three main responsibilities:
The schema defines the supported dataset sources, baseline strategies, judge settings, and scoring configuration.
Unknown fields are rejected.
The loader reads YAML safely, resolves optional _base.yaml inheritance, and calculates hashes for the source and
resolved definitions.
The registry discovers packaged tasks by ID and verifies that every referenced runner, dataset adapter, prompt,
parser, and scorer exists.
The CLI allows users to inspect and validate task definitions before running them.
Runtime behavior
When a task is executed, JudgeArena resolves it through the registry:
Task ID
-> load and validate task YAML
-> resolve dataset source and field mappings
-> apply task protocol defaults
-> select the registered runner
-> generate, judge, and score
Task definitions provide benchmark defaults, while users can still configure experiment-specific values.
The effective precedence is:
CLI flags -> run config YAML -> task-defined defaults -> framework defaults
For example:
Additional changes
result.