Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
87 commits
Select commit Hold shift + click to select a range
b2d9703
fix: add reasoning fixes to Squad_ma and TriviaQA_ma tasks
AuguB Jun 24, 2026
0079ec7
fix: add wide max_tokens to squad and triviaQA.
AuguB Jun 24, 2026
4650995
fix: implement post_process_generated_completion for squad
AuguB Jun 24, 2026
20c43c7
Merge branch 'main' into merlin_arthur_reasoning_fix
AuguB Jun 24, 2026
e903f57
fix: implement post_process_generated_completion and _get_ground_trut…
AuguB Jun 25, 2026
99ac523
feat: add correct sysprompt to SQuAD2_MA and add no-sysprompt version…
AuguB Jun 29, 2026
544bd5a
chore: correct benchmark name and add to task_names
AuguB Jun 29, 2026
baa7f08
fix: correct SQUAD system prompt
AuguB Jul 3, 2026
3b815e9
Improve squad system prompt again
Jul 6, 2026
fc09e31
Add instruction to use 'final answer' marker.
Jul 8, 2026
dcedad5
Smaller token limit for squad
AuguB Jul 10, 2026
24b44dc
fix: I am stupid
AuguB Jul 20, 2026
e3aac16
chore(deps): update dependency pytest to >=9.1.1,<10 (#409)
aar-public-version-bump-bot[bot] Jun 25, 2026
6316325
chore: refresh third-party license reports (#411)
aar-public-version-bump-bot[bot] Jun 25, 2026
c9a58fb
ci: adding claude code as a reviewer (#400)
prabhuteja12 Jun 25, 2026
b1c2fa3
refactor: Introduce EvalFactory.display_name (#413)
pacman82 Jun 25, 2026
0f13e86
chore(main): release 0.5.2 (#407)
github-actions[bot] Jun 25, 2026
4765982
ci: drive release-please with public version-bump bot (#382)
martinreinhardt01 Jun 25, 2026
99bcebf
chore(deps): update pre-commit hook astral-sh/uv-pre-commit to v0.11.…
aar-public-version-bump-bot[bot] Jun 26, 2026
f93ddbf
chore(deps): update ruff (#416)
aar-public-version-bump-bot[bot] Jun 26, 2026
4fba895
chore(deps): update actions/cache action to v6 (#417)
aar-public-version-bump-bot[bot] Jun 26, 2026
fb07d66
chore(deps): update dependency uv_build to >=0.11.24,<0.11.25 (#414)
aar-public-version-bump-bot[bot] Jun 26, 2026
de16e9d
refactor: removing ruler accuracy metrics (#412)
prabhuteja12 Jun 26, 2026
69aa6d3
chore: bump up cuda version to match pytorch defaults (#418)
prabhuteja12 Jun 28, 2026
d0e3424
fix: corrected path to dataset_revisions (#419)
prabhuteja12 Jun 29, 2026
8c167c6
chore: pin dataset revisions (#420)
github-actions[bot] Jun 29, 2026
71c1449
chore(main): release 0.5.3 (#421)
aar-public-version-bump-bot[bot] Jun 29, 2026
c69ef75
refactor: extract dataset_path and display_name (#422)
pacman82 Jun 29, 2026
d751258
chore: remove infinitebench tasks (#423)
prabhuteja12 Jul 1, 2026
10c3185
refactor: migrate collect_data_set_revisions to take eval_factory (#424)
martinreinhardt01 Jul 2, 2026
97bdf12
ci: auto-merge release-please PRs (#425)
martinreinhardt01 Jul 8, 2026
2ae3a68
chore(deps): lock file maintenance (#342)
aar-public-version-bump-bot[bot] Jul 9, 2026
877b6f6
refactor!: remove dead code from unused benchmarks (#430)
martinreinhardt01 Jul 9, 2026
013f7d9
chore(deps): update anthropics/claude-code-action digest to 37b464c (…
aar-public-version-bump-bot[bot] Jul 10, 2026
e223df8
fix(deps): update dependency openai to >=1.109.1,<3 (#397)
aar-public-version-bump-bot[bot] Jul 10, 2026
0cf1c5f
chore(deps): update pre-commit hook astral-sh/uv-pre-commit to v0.11.…
aar-public-version-bump-bot[bot] Jul 10, 2026
9eeb279
chore(deps): update dependency uv_build to >=0.11.27,<0.11.28 (#433)
aar-public-version-bump-bot[bot] Jul 10, 2026
c611261
chore: refresh third-party license reports (#428)
aar-public-version-bump-bot[bot] Jul 10, 2026
bdaad17
chore(main): release 0.6.0 (#432)
aar-public-version-bump-bot[bot] Jul 10, 2026
24fdfbd
chore(deps): update renovatebot/github-action action to v46.1.18 (#435)
aar-public-version-bump-bot[bot] Jul 10, 2026
581fe07
fix(deps): update dependency mistral-common to >=1.11.5,<2 (#436)
aar-public-version-bump-bot[bot] Jul 10, 2026
c4acf40
chore(deps): update dependency uv_build to >=0.11.28,<0.11.29 (#438)
aar-public-version-bump-bot[bot] Jul 11, 2026
df625bb
fix(deps): update dependency wandb to >=0.28.0,<1 (#439)
aar-public-version-bump-bot[bot] Jul 11, 2026
f3db6e4
chore(deps): update dependency mypy to >=2.2.0,<3 (#441)
aar-public-version-bump-bot[bot] Jul 11, 2026
0ade403
chore(deps): update anthropics/claude-code-action digest to e90deca (…
aar-public-version-bump-bot[bot] Jul 11, 2026
52b3809
chore: refresh third-party license reports (#442)
aar-public-version-bump-bot[bot] Jul 11, 2026
c9344f5
chore(main): release 0.6.1 (#437)
aar-public-version-bump-bot[bot] Jul 11, 2026
c1374bc
chore(deps): update pre-commit hook astral-sh/uv-pre-commit to v0.11.…
aar-public-version-bump-bot[bot] Jul 11, 2026
4e5793c
fix(deps): update dependency nltk to >=3.10.0,<4 (#444)
aar-public-version-bump-bot[bot] Jul 11, 2026
28cf9f0
chore(deps): update astral-sh/setup-uv action to v8.3.2 (#446)
aar-public-version-bump-bot[bot] Jul 12, 2026
17e975a
fix(deps): update dependency tensorboard to v2.21.0 (#447)
aar-public-version-bump-bot[bot] Jul 12, 2026
b0ca51e
chore: refresh third-party license reports (#450)
aar-public-version-bump-bot[bot] Jul 12, 2026
c2dc858
chore(main): release 0.6.2 (#445)
aar-public-version-bump-bot[bot] Jul 12, 2026
66de43b
refactor: use dataset_revision_collection and extend registry methods…
fsschneider Jul 13, 2026
e9c5d26
refactor: start switching dataset version lock file from task class n…
fsschneider Jul 13, 2026
17a5274
chore: remove dead code, registering extra dependencies (#426)
pacman82 Jul 13, 2026
ff2b81b
refactor: each leaf task has an associated revision lockfile (#451)
pacman82 Jul 14, 2026
4debbd4
refactor: pinning job now updates hf-dataset-revisions.json (#453)
pacman82 Jul 14, 2026
3af21d6
fix: space prefixing mathminerva bpb tasks (#454)
prabhuteja12 Jul 15, 2026
02daf54
fix: limit memory used by code exec sandbox (#457)
prabhuteja12 Jul 15, 2026
0c06ad4
chore(main): release 0.6.3 (#455)
aar-public-version-bump-bot[bot] Jul 15, 2026
40734e5
feat: allow user prompt suffix (#452)
NickyHavoc Jul 15, 2026
40c87e1
feat: register FullTextMMLU task for use in data ablations (#459)
tfburns Jul 15, 2026
87a8173
chore(main): release 0.6.4 (#458)
aar-public-version-bump-bot[bot] Jul 15, 2026
87147d5
refactor: use hf-dataset-revision.json's pinning (#461)
pacman82 Jul 16, 2026
d5ead33
chore: update generated task docs (#460)
aar-public-version-bump-bot[bot] Jul 16, 2026
9b45453
chore: remnants of legacy pinning mechanism removed (#462)
prabhuteja12 Jul 16, 2026
8f5a007
ci: failing docker build removed (#463)
prabhuteja12 Jul 16, 2026
1877927
ci: cache invalidation of HF datasets is tied to lockfile (#464)
pacman82 Jul 17, 2026
fd5bb6f
fix: missing revision lockfile declared for mbpp (#465)
pacman82 Jul 17, 2026
b9fd720
test: add tests to mbpp (#467)
prabhuteja12 Jul 17, 2026
0d1c717
refactor: pinning of hf datasets lives in update_hf_datasets.py (#468)
pacman82 Jul 17, 2026
f8b1f6c
feat!: sacrebleu completly removed (#469)
pacman82 Jul 17, 2026
073013a
chore(deps): update dependency torch to v2.13.0 [security] (#471)
aar-public-version-bump-bot[bot] Jul 18, 2026
bd8374b
chore(deps): update anthropics/claude-code-action digest to 3553f84 (…
aar-public-version-bump-bot[bot] Jul 18, 2026
8fe235c
chore: refresh third-party license reports (#474)
aar-public-version-bump-bot[bot] Jul 18, 2026
605f74a
chore(main): release 0.7.0 (#466)
aar-public-version-bump-bot[bot] Jul 18, 2026
ac0ce79
chore(deps): update renovatebot/github-action action to v46.1.19 (#475)
aar-public-version-bump-bot[bot] Jul 18, 2026
76d1324
chore(deps): update dependency uv_build to >=0.11.29,<0.11.30 (#476)
aar-public-version-bump-bot[bot] Jul 19, 2026
90e7506
chore(deps): update anthropics/claude-code-action digest to af0559e (…
aar-public-version-bump-bot[bot] Jul 19, 2026
bdbbf09
chore(deps): update pre-commit hook astral-sh/uv-pre-commit to v0.11.…
aar-public-version-bump-bot[bot] Jul 19, 2026
a351fa9
chore(deps): update ruff (#479)
aar-public-version-bump-bot[bot] Jul 20, 2026
77ee166
fix(deps): update dependency wandb to >=0.28.1,<1 (#480)
aar-public-version-bump-bot[bot] Jul 20, 2026
93ea63f
ci: hf datasets are cached lazily per job. Global warmup job is gone …
pacman82 Jul 20, 2026
63ee09a
fix: fix squad benchmark
AuguB Jul 21, 2026
a12cf00
Merge remote-tracking branch 'origin/main' into trace/ma-pipeline
AuguB Jul 23, 2026
9051210
Merge remote-tracking branch 'origin/main' into trace/ma-pipeline
Aug 24, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions src/eval_framework/tasks/benchmarks/squad.py
Original file line number Diff line number Diff line change
Expand Up @@ -238,6 +238,7 @@ def _get_ground_truth(self, item: dict[str, Any]) -> list[str]:
return item["answers"]["text"]



class SQuAD2_MA(SQUAD2):
"""SQuAD v2 with the exact system prompt used in MA training"""

Expand Down Expand Up @@ -301,6 +302,7 @@ def _get_system_prompt_text(self, item: dict[str, Any]) -> str | None:
return ""



class SQuAD_OLMES(SQUAD):
"""SQuAD variant matching OLMES implementation."""

Expand Down
78 changes: 78 additions & 0 deletions src/eval_framework/tasks/benchmarks/triviaqa.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
import random
from typing import Any

from eval_framework.metrics.completion.accuracy_completion import AccuracyCompletion
from eval_framework.metrics.completion.f1 import F1, F1SquadNormalized
from eval_framework.tasks.base import BaseTask, Language, ResponseType, Sample
from eval_framework.tasks.dataset_revisions import HF_REVISIONS_LOCKFILE


class TRIVIAQA(BaseTask[str]):
"""Trivia QA dataset: https://huggingface.co/datasets/mandarjoshi/trivia_qa"""

REVISION_LOCKFILE = HF_REVISIONS_LOCKFILE

NAME = "TriviaQA"
DATASET_PATH = "mandarjoshi/trivia_qa"
SAMPLE_SPLIT = "validation"
FEWSHOT_SPLIT = "train"
RESPONSE_TYPE = ResponseType.COMPLETION
METRICS = [AccuracyCompletion, F1]
SUBJECTS = ["rc.wikipedia.nocontext"]
PERTURBATION_UNMODIFIABLE_WORDS = ["Question", "Answer"]
LANGUAGE = Language.ENG

def __init__(self, num_fewshot: int = 0) -> None:
super().__init__(num_fewshot)
self.stop_sequences = ["\n"]
self.max_tokens = 400 # the max length of the ground truth is 282 characters while the average is ~16
self.rnd_choice_shuffle = random.Random()

def _get_instruction_text(self, item: dict[str, Any]) -> str:
prompt = f"Question: {item['question'].strip()}\nAnswer:"
return prompt

def _get_fewshot_target_text(self, item: dict[str, Any]) -> str:
target = self._get_ground_truth(item)[0]
assert target is not None
assert isinstance(target, str)
return f" {target}"

def _get_ground_truth(self, item: dict[str, Any]) -> list[str]:
return item["answer"]["aliases"]

def post_process_generated_completion(self, completion_text: str, sample: Sample | None = None) -> str:
return completion_text.strip().rstrip(".")


class TriviaQA_MA(TRIVIAQA):
"""TriviaQA with the exact system prompt used in MA training"""

REVISION_LOCKFILE = HF_REVISIONS_LOCKFILE

NAME = "TriviaQA_MA"
SUBJECTS = ["rc.wikipedia"]
UNANSWERABLE_STR = "unanswerable"

METRICS = [AccuracyCompletion, F1, F1SquadNormalized]
PERTURBATION_UNMODIFIABLE_WORDS = ["Question", "Answer", "Context", "unanswerable"]

def __init__(self, num_fewshot: int = 0) -> None:
super().__init__(num_fewshot)
self.stop_sequences = []
self.max_tokens = 27_000

def _get_context_text(self, item: dict[str, Any]) -> str:
return "\n\n".join(item["entity_pages"]["wiki_context"])

def _get_system_prompt_text(self, item: dict[str, Any]) -> str | None:
return (
"You are a helpful assistant and will answer the user's questions carefully, "
"logically, accurately and well-reasoned.\n"
"Use the given context to answer the question faithfully. Answer only if the "
f"answer is present in the given context, otherwise respond with '{self.UNANSWERABLE_STR}' "
"if the answer is not present in the context."
)

def _get_instruction_text(self, item: dict[str, Any]) -> str:
return f"Context:\n{self._get_context_text(item)}\n\nQuestion:\n{item['question'].strip()}\n"
1 change: 1 addition & 0 deletions src/eval_framework/tasks/hf-dataset-revisions.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
"google-research-datasets/nq_open": "5dd9790a83002ad084ddeb7c420dc716852c6f28",
"google/IFEval": "966cd89545d6b6acfd7638bc708b98261ca58e84",
"jzhang86/de_ifeval": "4f52d847003b3c83cc282e9d296853a24b34b19a",
"mandarjoshi/trivia_qa": "0f7faf33a3908546c6fd5b73a660e0f8ff173c2f",
"math-ai/aime25": "563bb8404243c5f09de6ec262f2db674fe5bce9b",
"math-ai/aime26": "79037aebdb6580008fb960d17cb21fd3099083e3",
"nuprl/MultiPL-E": "28441b6024e71d4a1c1c0f6bf171c935cd5a43f2",
Expand Down
7 changes: 7 additions & 0 deletions src/eval_framework/tasks/task_names.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ def register_all_tasks(registry: Registry | None = None) -> None:
register_piqa_tasks(registry=registry)
register_sciq_tasks(registry=registry)
register_squad_tasks(registry=registry)
register_triviaqa_tasks(registry=registry)
register_winogrande_tasks(registry=registry)
register_csqa_tasks(registry=registry)
register_drop_tasks(registry=registry)
Expand Down Expand Up @@ -196,6 +197,12 @@ def register_squad_tasks(registry: Registry) -> None:
register_lazy_task("eval_framework.tasks.benchmarks.squad.SQuAD2_MA_NO_SYSPROMPT", registry=registry)


def register_triviaqa_tasks(registry: Registry) -> None:
"""Register triviaqa benchmark tasks."""
register_lazy_task("eval_framework.tasks.benchmarks.triviaqa.TRIVIAQA", registry=registry)
register_lazy_task("eval_framework.tasks.benchmarks.triviaqa.TriviaQA_MA", registry=registry)


def register_winogrande_tasks(registry: Registry) -> None:
"""Register winogrande benchmark tasks."""
register_lazy_task("eval_framework.tasks.benchmarks.winogrande.WINOGRANDECloze", registry=registry)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -354,6 +354,10 @@
"SocialIQAMC_OLMES.ConcatFormatter": "484d60e7f583eb6739d6027fec255d06",
"SocialIQAMC_OLMES.Llama3Formatter": "83a826a85d522f5bc40ecde5599a9dc5",
"SocialIQAMC_OLMES.NoStripConcatFormatter": "484d60e7f583eb6739d6027fec255d06",
"TRIVIAQA.ConcatFormatter": "33595d3c66378ea01b0d1c99a37761e4",
"TRIVIAQA.Llama3Formatter": "663385749f5605d86f19b39ce74365eb",
"TriviaQA_MA.ConcatFormatter": "ba2f5447024449093a6c07103469d0d8",
"TriviaQA_MA.Llama3Formatter": "c53ed23137d14fc5e1d95a711ff83905",
"WINOGRANDECloze.ConcatFormatter": "a7ff60e76f35d94da1f329a23e0f889b",
"WINOGRANDECloze.Llama3Formatter": "1c21b8be1a51a76ab39a9be7f7dc0cc4",
"WINOGRANDECloze.NoStripConcatFormatter": "a7ff60e76f35d94da1f329a23e0f889b",
Expand All @@ -366,4 +370,4 @@
"WINOGRANDE_ELLAMIND_PARTIAL_EVAL_DE.ConcatFormatter": "bb9c64876b5dc3894064a35eabbe29ec",
"WINOGRANDE_ELLAMIND_PARTIAL_EVAL_DE.Llama3Formatter": "1a679d947f96633962d769eb1139ab38",
"WINOGRANDE_ELLAMIND_PARTIAL_EVAL_DE.NoStripConcatFormatter": "bb9c64876b5dc3894064a35eabbe29ec"
}
}
45 changes: 45 additions & 0 deletions tests/tests_eval_framework/tasks/benchmarks/test_triviaqa.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
import pytest

from eval_framework.tasks.benchmarks.triviaqa import TriviaQA_MA
from eval_framework.tasks.registry import Registry
from eval_framework.tasks.task_names import register_triviaqa_tasks
from template_formatting.formatter import BaseFormatter, ConcatFormatter, Llama3Formatter
from tests.tests_eval_framework.tasks.benchmarks.utils import run_formatter_hash_test

# Registry for this test suite only holding triviaqa tasks
_triviaqa_registry = Registry()
register_triviaqa_tasks(registry=_triviaqa_registry)


@pytest.mark.formatter_hash
@pytest.mark.parametrize("formatter_cls", [Llama3Formatter, ConcatFormatter])
@pytest.mark.parametrize("task_name", _triviaqa_registry.task_names())
def test_formatter_hash(task_name: str, formatter_cls: type[BaseFormatter]) -> None:
run_formatter_hash_test(task_name, formatter_cls, registry=_triviaqa_registry)


@pytest.fixture
def item():
return {
"question": "What is the capital of France?",
"answer": {"aliases": ["Paris", "Paris, France"]},
"entity_pages": {"wiki_context": ["Paris is the capital of France.", "France is in Europe."]},
}


def test_triviaqa_ma_system_prompt_instructs_reject(item) -> None:
system = TriviaQA_MA()._get_system_prompt_text(item)
assert system is not None
assert f"respond with '{TriviaQA_MA.UNANSWERABLE_STR}'" in system


def test_triviaqa_ma_instruction_is_context_question_only(item) -> None:
instruction = TriviaQA_MA()._get_instruction_text(item)
assert instruction == (
"Context:\nParis is the capital of France.\n\nFrance is in Europe.\n\n"
"Question:\nWhat is the capital of France?\n"
)


def test_triviaqa_ma_ground_truth_uses_aliases(item) -> None:
assert TriviaQA_MA()._get_ground_truth(item) == ["Paris", "Paris, France"]
Loading