Repository navigation
refactor(judge): split eval judge agreement into helpers; public build_validity_pairs - #1416
Conversation
|
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1416 +/- ##
==========================================
- Coverage 96.49% 96.48% -0.01%
==========================================
Files 569 569
Lines 75249 75277 +28
Branches 12980 12981 +1
==========================================
+ Hits 72611 72634 +23
- Misses 1615 1616 +1
- Partials 1023 1027 +4
🚀 New features to boost your workflow:
|
Mutation of changed linesAt 7717744: 60 caught · 20 missed Each row is a small deliberate break (a mutant) of a line this PR changes that every test reaching that line still passes. Add a test that fails on it or, if it cannot change behaviour, put
Not checked:
Warning only: a missed break does not fail the job. Updated on every push; the full report is in the ci run summary. |
) * refactor: make shared helpers public and dedupe the git -z reader - eval/stats: round_p, wilson, apply_correction, describe_deltas, finalize_result and paired_differences lose their underscore; their users (interactions, binary_stats, model_compare, tests) follow. judge_validity keeps importing the old _wilson alias until #1416. - report/eval_io: the eval-file, answers and Q&A sidecar readers the paired and one-condition reports share, moved out of eval_report. - scripts/_git_z: one git_z(*args, cwd) for the three check scripts that carried identical copies; the duplicate baseline entry goes. No output changes. Signed-off-by: Nikolay Petrov <nikolay.a.petrov@intel.com> * fix(scripts): check scripts find their sibling _git_z under PYTHONSAFEPATH Signed-off-by: Vladislav Perevezentsev <vladislav.perevezentsev@intel.com> * test(report): both reports must take sibling_answers_path from eval_io Signed-off-by: Vladislav Perevezentsev <vladislav.perevezentsev@intel.com> * test(stats): an adjusted p of exactly 0.05 is not significant Signed-off-by: Vladislav Perevezentsev <vladislav.perevezentsev@intel.com> * test(stats): record the verified boundary fix Thread: PRRT_kwDOVBg7g86-f3wf: already fixed in 1cbdcf3 Signed-off-by: Nikolay Petrov <nikolay.a.petrov@intel.com> * test(cli): supply an agent run fault fixture Signed-off-by: Nikolay Petrov <nikolay.a.petrov@intel.com> (cherry picked from commit e249323eb321bbc70ac425c03170071d835a143c) --------- Signed-off-by: Nikolay Petrov <nikolay.a.petrov@intel.com> Signed-off-by: Vladislav Perevezentsev <vladislav.perevezentsev@intel.com> Co-authored-by: Vladislav Perevezentsev <vladislav.perevezentsev@intel.com>
…d_validity_pairs cmd_eval_cross_judge (147 lines, ruff mccabe 29) is now a short sequence of helpers: grounded truth, the stored-score gate, the pairwise/checklist and validity file loads, per-judge scoring, validity warnings and the report writer. The gate's problem messages are unchanged. judge wording and judge sequential imported the private `_build` from judge_validity; it is now build_validity_pairs. No behaviour change: a differential run of 7700 argument/fixture cases matched the previous output (stdout, stderr, exit codes, written files, judge calls). Signed-off-by: Nikolay Petrov <nikolay.a.petrov@intel.com>
The function is at complexity 5 after the split, under the cap; the ratchet asks for its entry to go (scripts/check_growth.py --update). Signed-off-by: Nikolay Petrov <nikolay.a.petrov@intel.com>
There was a problem hiding this comment.
🟢 Approval recommended
There are no active review issues requiring changes.
No open issues 🎉
What changed in this PR
0 new findings; nothing to fix.
This refactor simplifies dokimi’s judge-agreement command while preserving its behavior and exposes the shared validity-pair builder.
Changes:
- Extract focused helpers from
cmd_eval_cross_judge. - Rename
_buildto publicbuild_validity_pairsand update callers and tests. - Remove the obsolete complexity exemption and document the public API.
| File | Description |
|---|---|
dokimi/tests/test_judge_validity.py |
Update tests to use the public builder. |
dokimi/tests/test_eval_output_write_errors.py |
Update the builder mock. |
dokimi/scripts/growth_baseline.json |
Remove the command’s complexity exemption. |
dokimi/dokimi/eval/judge_validity.py |
Expose build_validity_pairs. |
dokimi/dokimi/eval/judge_sequential.py |
Use the public builder. |
dokimi/dokimi/commands/judge_reliability.py |
Extract agreement helpers and update the wording caller. |
dokimi/changelog.d/20261129_120000_napetrov_arch-r8-6.md |
Document the public name and migration. |
Review effort: Balanced
|
✅ OpenCodeReview: Review complete: 0 finding(s) across 7 selected item(s). CI at Review details
|
vchamarthi
left a comment
There was a problem hiding this comment.
Approving 7717744.
Still open: when I changed the code on purpose, the tests still passed for 1 of 12 changes, and no test pins this one down yet (non-blocking): dokimi/dokimi/commands/judge_reliability.py:288 (the condition is negated).
What I checked: the 363 changed tests pass, and fail on main as expected; the full test suite passes with main merged in (43,553 tests), apart from failures main has too; it merges cleanly onto main.
Summary
cmd_eval_cross_judgewas 147 lines, ruff mccabe 29, the largest function incommands/. It is now a sequence of helpers, and the private_build(imported by judge wording and judge sequential) is public asbuild_validity_pairs.Evidence
Merge Danger
main. The agreement command retains repeatable--judge, comma-separated names within each argument, and the existing diagnostics.build_validity_pairspreserves the private helper’s signature. All repository callers use the public name.Addedfragment.🤖 Generated with Claude Code