Repository navigation
scripts/musebench/compare.py compares a candidate report with a baseline report built on the same cohort sha256 and seen - #16
Open
unohee wants to merge 1 commit into
Conversation
…luates gates scripts/musebench/compare.py takes --baseline and --candidate musebench_report.json files and refuses (exit 2) unless both describe the same cohort and the same seen/unseen field. It writes comparison.json and comparison.md with baseline, candidate, delta and Wilson 95 % intervals for every headline metric and every generator's clean FNR / AUROC, for the all/seen/unseen splits (rate deltas also carry Newcombe's hybrid-score interval). --gates evaluates a spec of rules (max, min, max_increase, min_decrease; optional per generator): exit 0 pass, 3 gate failure, 2 invalid input. docs/MUSEBENCH.md gains "Cohorts, comparison and gates"; docs/examples/musebench_gates.example.json is a placeholder spec. tests/test_musebench_compare.py (17 tests) covers pass, gate failure, cohort mismatch (manifest sha and sample-vs-full), seen-field mismatch, missing/unknown metrics and generators, malformed rules, section selection and Newcombe's published example. Assumptions: - The cohort-file milestone (report.py --cohort) has not landed on this branch, so cohort identity is read from run.cohort.sha256 (or run.cohort_sha256) when a report records one, and otherwise from run.input_manifest_sha256 + coverage.eval_rows for a full-cohort report. A sample-cohort report is therefore never comparable with a full-cohort one. - A report without run.seen_field (built before --seen-field existed) uses report.py's default seen_in_training. - A rule whose metric has no rows (n = 0) in a report it needs is invalid input (exit 2), not a pass or fail, so a gate cannot pass vacuously.
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.
Milestone of an auto-claude run.
Check:
export XDG_RUNTIME_DIR="${XDG_RUNTIME_DIR:-/run/user/$(id -u)}" && systemd-run --user --scope -q -p MemoryMax=6G ~/RTX_ENV/bin/python -m pytest -m "not slow" -q -p no:cacheprovider && ~/RTX_ENV/bin/python scripts/check_docs.py && ~/RTX_ENV/bin/python scripts/musebench/compare.py --help >/dev/null && test -f docs/examples/musebench_gates.example.json && ls tests/test_musebench_compare*.py && grep -q "compare.py" docs/MUSEBENCH.md && ! grep -rniE "jupiter|h5_soup|codec4" docs/examples scripts/musebench/compare.pyPlan: .claude/auto-plan.md (local to the run).