Repository navigation
Add HumanEval+/MBPP+ (EvalPlus) as native sandboxed LightEval tasks - #24
Merged
Merged
Conversation
Adds `humaneval_plus` and `mbpp_plus` as native inspect-ai tasks (BFCL shape: record_to_sample + generate(cache=True) solver + @scorer), migrating these code benchmarks off lm-eval-harness so they use LightEval's wiring, dashboard sample logging, and reasoning-trace separation. - evalplus/main.py: instruct prompt, extracts code from the (post-reasoning) final answer, grades by executing against EvalPlus's augmented tests. pass@1 is estimated over N samples via the wrapper's epochs (mean reducer). - evalplus/execution.py: check_correctness/run_test grader deliberately mirroring lcb's signature + multiprocessing.Process pattern so the TensorWave network sandbox (sandbox_grading.py) wraps it with no custom wrapper; the sample carries a one-element input_output so the generic wrapper's timeout math works unchanged. - evalplus/build_data.py: normalizes evalplus/humanevalplus + evalplus/mbppplus into a uniform multi-config HF dataset (ezosa/evalplus). - tests/unit/tasks/test_evalplus.py: pure-stdlib grading tests (pass/fail/raise/ timeout/no-func + code extraction incl. post-reasoning answers). Reasoning stays ON (unlike the lm-eval *_instruct tasks, which force an empty think block); execution MUST run under eval_lighteval_sandboxed.sbatch. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
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.
What
Adds
humaneval_plusandmbpp_plus(EvalPlus) as native inspect-ai LightEval tasks, migrating these code-generation benchmarks off lm-eval-harness so they use LightEval's wiring, dashboard sample logging, and reasoning-trace separation.New package
src/lighteval/tasks/tasks/evalplus/(auto-discovered likebfcl/):main.py— BFCL inspect-ai shape (record_to_sample+solver=[generate(cache=True)]+@scorer). Instruct-style prompt; extracts code from the model's post-reasoning final answer (withreasoning_parser=qwen3the completion is the answer, not the<think>trace); grades by executing against EvalPlus's augmented unit tests. pass@1 estimated over N samples via the wrapper'sepochs(mean reducer) — no custom metric.execution.py—check_correctness(sample, generation, timeout)/run_test(sample, test, timeout)grader that deliberately mirrors lcb's signature +multiprocessing.Processpattern, so the TensorWave network sandbox (sandbox_grading.py) wraps it via a single generic wrapper with no per-task code. Thesamplecarries a one-elementinput_outputpurely so the wrapper's timeout math (which indexessample["input_output"]["inputs"]) works unchanged.reliability_guardis vendored from OpenAI human-eval (defensive only; real isolation is the sandbox'sCLONE_NEWUSER|CLONE_NEWNET).build_data.py— normalizesevalplus/humanevalplus+evalplus/mbppplusinto a uniform multi-config HF dataset (ezosa/evalplus, configshumaneval_plus/mbpp_plus), deriving MBPP's entry point from its referencecode.tests/unit/tasks/test_evalplus.py— pure-stdlib grading tests: correct→pass, wrong/raise/timeout/no-function→fail, and code extraction (incl. post-reasoning answers).Why
The lm-eval
*_instructcode tasks force an empty<think></think>block into the prompt, so the model never reasons. This migration keeps reasoning ON and gives proper LightEval logging.Safety
Execution is unsafe and must run under
eval_lighteval_sandboxed.sbatch. The consuming TensorWave repo registers the task prefixes (humaneval,mbpp) insandboxed_evals.SANDBOXED_TASK_PREFIXESand the grader inGRADER_PATCHES(separate PR).Verification
fork).evalplus/main.py;humaneval_plus/mbpp_plusresolve.🤖 Generated with Claude Code