feat(benchmarks): add GSM8K, HumanEval, and BBH end-to-end (#99)#115
feat(benchmarks): add GSM8K, HumanEval, and BBH end-to-end (#99)#115minion1227 wants to merge 3 commits into
Conversation
e79b395 to
09f49ce
Compare
tmimmanuel
left a comment
There was a problem hiding this comment.
-
HumanEval is added to both
trainandeval, but both entries use the same only availabletestsplit. That makes the eval score non-disjoint from the optimization set and invalidates the held-out comparison. If the intent is a real eval benchmark, HumanEval should not be intrainas wired here. Seeconfigs/benchmarks.yaml. -
BBH has a scorer, but the shared
has_answer()helper does not know aboutbbh. That helper is used by_committed_answer()and the trainingformat_bonuspath, so BBH trajectories will never be recognized as having a valid parseable answer even when they do. Add aBBH_BENCHMARKSbranch there, aligned with_bbh_extract_letter/_check_bbh. Seesrc/trinity/orchestration/reward.py.
…er#99) The leaderboard schema, mock data, and web types already carried gsm8k / humaneval / bbh metric fields, but nothing in the training/eval core ever produced those scores — they were permanent nulls. This wires all three end-to-end, reusing existing grading paths with no core-checker changes. - dataset.py: add gsm8k/humaneval/bbh to SUPPORTED_BENCHMARKS and _HF_LOADERS, with HF loaders (openai/gsm8k main; openai/openai_humaneval; lukaemon/bbh across all 27 subtasks) plus offline toy fallbacks, following the existing math500/mmlu/livecodebench pattern (same lazy-import guard + seeded determinism). - reward.py: register gsm8k in MATH_BENCHMARKS and humaneval in CODE_BENCHMARKS; add a bbh grader (multiple-choice-letter path for "(X)" targets, else normalized exact-match). GSM8K's loader extracts the post-#### number so it grades on the existing math path; HumanEval shapes each row into the existing run_pass_at_1 assert contract ("<test>\ncheck(<entry_point>)"), so the sandbox is unchanged. BBH multiple-choice subtasks go up to (G), so a permissive A-Z _bbh_extract_letter is used for BBH (extract_choice_letter caps at A-D). - benchmarks/: gsm8k.py, humaneval.py, bbh.py facades mirroring livecodebench.py. - configs/benchmarks.yaml: gsm8k/humaneval in-distribution, bbh in ood. - tests: offline loader (toy determinism + HF-row parsing) and grader coverage. - docs: JOURNAL.md entry and SPEC.md §6.6 [OUR CHOICE] note. scripts/results_table.py and the validator leaderboard need no changes — both read benchmark names generically, so real scores flow once an eval reports them. Fixes mini-router#99
…, has_answer knows bbh Two review points from mini-router#115: 1. HumanEval was wired into both `train` and `eval` on its only (test) split, making the eval score non-disjoint from the optimization set. HumanEval is now eval-only (it ships a single split); GSM8K keeps its proper disjoint train/test splits. 2. `has_answer()` had no `bbh` branch, but it drives `_committed_answer()` and the training `format_bonus` path — so BBH trajectories were never recognized as carrying a parseable answer even when they did. Add a `BBH_BENCHMARKS` branch aligned with `_bbh_extract_letter` / `_check_bbh` (multiple-choice letter or non-empty free-form target). Adds tests: has_answer("bbh", ...) for MCQ/free-form/empty, and a config check that HumanEval is eval-only while GSM8K stays in both.
09f49ce to
f758b22
Compare
|
Thanks — both addressed in f758b22:
Added tests for both (has_answer bbh MCQ/free-form/empty; a config check that HumanEval is eval-only while GSM8K stays in both). Also rebased onto latest main (resolved the BFCL benchmark overlap, keeping both). Full suite: 244 passed. |
…-router#99) CI (which has `datasets` + network) loaded the real HumanEval set, so `load_tasks("humaneval")[0]` was the `specialFilter` task, not the `add` toy — test_humaneval_toy_grades then failed grading `add` against it. Grade against `_toy_tasks("humaneval")` directly, and force the offline path in test_toy_fallbacks_load_offline by stubbing `_try_load_hf`, so both are deterministic regardless of dataset/network availability.
|
CI fix pushed in 41f361c — The failure was environment-specific: CI has |
Fixes #99
Problem
The leaderboard schema, mock data, and web types already carry
gsm8k/humaneval/bbhmetric fields, but nothing in the training/eval core ever produces those scores — they are permanentnulls. This wires all three end-to-end so a miner can actually train/eval against them and see real numbers.Approach — reuse existing grading paths, no core-checker changes
openai/gsm8k(main)#### <answer>number → graded on the existingMATH_BENCHMARKSpathopenai/openai_humanevalrun_pass_at_1assert contract ("<test>\ncheck(<entry_point>)") → no sandbox changeslukaemon/bbhbbhchecker: MCQ-letter path for"(X)"targets, else normalized exact-match → OOD suite (relevant to R5)Changes
dataset.py:gsm8k/humaneval/bbhadded toSUPPORTED_BENCHMARKS+_HF_LOADERS, with HF loaders (all 27 BBH subtask configs) + offline toy fallbacks, following the existingmath500/mmlu/livecodebenchpattern (same lazy-import guard + seeded-shuffle determinism).reward.py: registergsm8kinMATH_BENCHMARKS,humanevalinCODE_BENCHMARKS, addBBH_BENCHMARKS+_check_bbh. BBH multiple-choice subtasks go up to(G)(5–7 options), so a permissive A–Z_bbh_extract_letteris used for BBH (extract_choice_lettercaps at A–D) — otherwise those subtasks silently under-count.benchmarks/:gsm8k.py,humaneval.py,bbh.pyfacades mirroringlivecodebench.py.configs/benchmarks.yaml:gsm8k/humanevalin-distribution (train/eval),bbhinood.tests/test_benchmarks_gsm8k_humaneval_bbh.py— offline loader (toy determinism + monkeypatched HF-row parsing) and grader coverage for all three (incl. the(E)/(G)BBH cases and HumanEval correct/wrong).JOURNAL.mdentry (AGENTS.md §6 protocol) +SPEC.md§6.6[OUR CHOICE]note.Scope / safety
Additive only — no changes to the coordinator/CMA-ES loop, the sandbox/executor, or the frontend.
scripts/results_table.pyand the validator leaderboard need no changes (both read benchmark names generically), so realgsm8k/humaneval/bbhscores flow through once an eval reports them.Full root suite: 204 passed;
ruffclean on the changed lines. All loaders verified offline via toy fallbacks; graders verified with correct/wrong cases.