Repository navigation
Add Bayes@N task variants for HumanEval and MBPP - #329
Open
mohsenhariri wants to merge 1 commit into
Open
mohsenhariri wants to merge 1 commit into
mohsenhariri wants to merge 1 commit into
Conversation
Author
|
The CI run for |
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.
Add optional binary Bayes@N posterior summaries through three registered task names:
humaneval-bayes-at-n,humaneval-unstripped-bayes-at-n, andmbpp-bayes-at-n. They retain the original prompts, references, postprocessing and program checks, and addbayes_at_n(posterior mean) andbayes_at_n_std(posterior SD) alongside pass@k. Existing task names and output dictionaries are unchanged.accelerate launch main.py --tasks humaneval-bayes-at-n \ --load_generations_path generations.json --n_samples 16 \ --allow_code_execution --metric_output_path evaluation_results.jsonThe native standard-library helper implements the binary, uniform-prior case of Bayes@N, Algorithm 1 and Appendix A. Each problem has an independent Beta(1,1) prior; corpus uncertainty is
sqrt(sum(problem posterior variances))/problem_count. No runtime dependency is added. Both fields use the [0,1] scale and describe the fixed problem set's average latent correctness, separately from pass@k.The metric checks complete equal-size program rows, matching test references, expected sample counts and unique binary execution verdicts. It rejects intermediate checkpoints and nonzero offsets with loaded generations: the existing resume/loader paths can otherwise shift question identities. Invalid or empty loaded files raise a clear error before execution. Historical observations, categorical rubrics and credible intervals are outside this scope.
Validation in a dedicated Python 3.9.25 environment, matching the CI runtime:
1e-14.git diff --checkpasses.The full suite passed 40 tests before the final checkpoint/file-validation regressions were added. On the final source, an online rerun passed 45 tests and failed one existing test when a public dataset request returned HTTP 429. An offline rerun passed 44 and failed the two existing dataset-dependent tests; unchanged upstream reproduced both failures in the same environment. All 43 new tests pass independently. The legacy downloader also needed its public tiny-model cache populated because it cannot handle the Hub's relative redirects; no project or installed library code was patched.
I am a coauthor of the Bayes@N paper. Code, tests and documentation were prepared with Codex assistance.