(5/n) Package m-ArenaHard task families with language variants - #83
(5/n) Package m-ArenaHard task families with language variants#83kargibora wants to merge 3 commits into
Conversation
4899cb6 to
ad7b74d
Compare
| elif args.command == "show": | ||
| resolved = _require(parser, tasks, args.task) | ||
| output = resolved.model_dump() | ||
| if resolved.selection is not None: |
There was a problem hiding this comment.
As we dont want to populate every language task with its own file, this allow us to basically select which sub-tasks we want to execute.
| aliases[alias] = task_id | ||
|
|
||
|
|
||
| def resolve_task( |
There was a problem hiding this comment.
Now task can be m-arena-hard-en for example, which is basically m-arena-hard but only en samples. Thus we need an extra step for resolving this.
There was a problem hiding this comment.
not for now, but perhaps having another character to split task configuration would be easier, for instance m-arena-hard:en (parsing seems too complicated)
| tags: tuple[str, ...] = () | ||
| dataset: DatasetSpec | ||
| protocol: PairwiseProtocol | ||
| variants: SuffixVariants | None = None |
There was a problem hiding this comment.
An example for adding an functionality in the schema.
In TaskSpec, we can specify whether to selefct a specific subset (task or language based) easily.
Resolve validated suffixes and groups from one task definition and record the selected view in CLI output and run metadata.
Define each benchmark version once, resolve language and EU views through task selectors, and remove the remaining legacy version/source maps.
- schema.py: remove the SuffixVariants.separator field (it was Literal["-"], a config knob that could only ever be "-"); hardcode the "-" join. - registry.py: split the variant-ID collision check into two clear messages (collides with an existing task vs. with another generated variant).
39587bc to
7408533
Compare
| aliases[alias] = task_id | ||
|
|
||
|
|
||
| def resolve_task( |
There was a problem hiding this comment.
not for now, but perhaps having another character to split task configuration would be easier, for instance m-arena-hard:en (parsing seems too complicated)
Summary
This PR migrates m-ArenaHard v0.1 and v2.0 into the declarative task registry.
m-ArenaHard supports multiple benchmark versions and many language-specific views. Defining every combination as a
separate YAML file would duplicate the same dataset, protocol, judge, and scoring configuration dozens of times.
This PR introduces task-family variants so each benchmark version is defined once while language and language-group
views are resolved from validated task suffixes.
Task-family resolution
The task definitions declare their supported variants:
This allows the registry to resolve invocations such as:
The base ID selects all declared languages. A language suffix selects one language, while a group suffix expands to its
declared members.
The resolved task keeps both pieces of information:
This selection is also included in CLI inspection and run metadata.
Basically
ResolvedTaskSpeccontains all the important detail about tasks.Task organization
The definitions are organized as:
The shared base defines:
Each version then defines its own:
m-ArenaHard v0.1 uses Aya Expanse 8B as its task default, while v2.0 uses Gemini 2.5 Flash. Both allow runtime baseline
overrides.
Dataset handling
The m_arena_hard dataset adapter reads the resolved language selection and:
Resolved task invocation
-> download the pinned dataset sources
-> select the requested languages
-> normalize prompts and question IDs
-> load matching reference outputs
-> return canonical rows to the pairwise runner
The generic runner does not need to understand language suffixes or m-ArenaHard dataset layouts.
Validation
Variant definitions are validated to prevent:
Legacy m-ArenaHard version, revision, baseline, and prompt maps are removed because this information is now owned by the task definitions.
Main architectural difference
Before:
m_arenahard.py = configuration + task parsing + downloading + normalization
Now:
Task YAML = stable benchmark configuration
Task registry = task and language resolution
m_arenahard.py = downloading and dataset normalization
Pairwise runner = generation and evaluation
Notes
languagecolumn and filter it. Similarly for category, we can use it to filter instruction categories.