Repository navigation
refactor(judge): one judged-reply seam for judge, panel, pairwise, checklist - #314
Merged
Merged
Conversation
…ecklist The judge, the panel, the pairwise judge and the checklist each carried a copy of the parse, redraw, replay and reprompt loop. The pairwise copy had drifted: at pinned sampling it redrew the same prompt, which returns the same reply. Move the loop into dokimi/judged.py as judged_reply(), beside llm.ask_parsed (llm.py is over its growth ratchet). Each caller passes its prompt, parser and sampling state. The judge and panel call sequences, prompts and cache keys are pinned by tests/test_judged_reply_sequence.py and do not change. - Pairwise at pinned sampling reprompts a redraw with the reminder (behaviour fix, red test first). PairwiseJudge takes pinned=False by default. - Pairwise and checklist reruns replay the stored redraw. - Checklist moves onto the seam too; it imported the drifted pairwise copy. - validity_scoring.py is not moved: its retry loop re-asks on any exception rather than parsing a reply. Signed-off-by: Nikolay Petrov <nikolay.a.petrov@intel.com>
|
✅ OpenCodeReview: Review complete: 0 finding(s) across 13 selected item(s). Review details
|
The comment-block check in CI allows two lines of reason per block and a link for the rest. Shorten the four blocks added by the judged-reply seam; no code changes. Signed-off-by: Nikolay Petrov <nikolay.a.petrov@intel.com>
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #314 +/- ##
==========================================
- Coverage 94.05% 94.05% -0.01%
==========================================
Files 296 297 +1
Lines 38026 38018 -8
Branches 6430 6424 -6
==========================================
- Hits 35766 35756 -10
- Misses 1451 1452 +1
- Partials 809 810 +1
🚀 New features to boost your workflow:
|
Contributor
|
judge.py, panel.py: judged_reply seam kept, main's llm_cli check_sampling and CLI backends added. test_import_architecture.py: dokimi.judged joins main's llm_cli, llm_json, process_io, exit_codes. Signed-off-by: Alexander Rybkin <alexander.rybkin@intel.com>
Contributor
|
Merged current main (63c9cdb) into this branch. Conflicts were imports only:
On Linux the suite, ruff, mypy, bandit and the strict benchmark run all pass. |
# Conflicts: # dokimi/tests/test_import_architecture.py
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.
Part of #4.
Summary
Four copies of the judged-reply loop (parse, redraw, replay, reprompt) become one path:
PairwiseJudge(pinned=True).judged.pysits besidellm.py, which is over its growth ratchet.Evidence
test_pairwise_pinned_redraws_with_a_reminderfailed on main: the second prompt equalled the first (no reminder), so the redraw repeated the same reply.test_judge_*andtest_panel_*intests/test_judged_reply_sequence.pypin the judge and panel call sequences (prompts, draw keys, cache files, rerun call counts) and pass on both base and head.--randomly-seed11 and 22): 10937 passed, 5 skipped, 1 failed in each run:tests/test_process.py::test_sighup_kills_the_live_groups_tootimed out at 30 s under full-suite load. It passes in isolation under both seeds. No file it exercises changed.mypy(strict, package): no issues in 286 files.ruff checkon the changed files: passed.scripts/check_growth.py: the lowered baseline drops the two judge/panel entries that fell under the cap.Merge Danger
Door: two-way. No persisted format or schema change; the seam is internal.
Blast Radius: judge
evalCLI does not passpinnedyet, so CLI pairwise runs are unchanged.dokimi.llm; HEAD logged nothing for pairwise.Pairwise order NreplacesLLMin the unparseable warning.Follow-ups (not in this PR):
commands/judge_reliability.py: passpinned=toPairwiseJudgewhen the temperature or seed is set, and pass the same to the checklist, which is still unpinned and repeats its reply at a pinned temperature.validity_scoring.pyhas its own retry loop; it is not on this path and re-asks identical replies at pinned sampling.Checklist
pytestpasses (one load-sensitive timeout noted above)ruff,mypy, and schema checks passAGENTS.md(two fresh-context review passes; the last one reported noblocking:findings; later commits folded its nits).github/.licenserc.yaml)🤖 Generated with Claude Code