Repository navigation
feat(repo): show result.json process counts in repo report and repo compare - #177
Conversation
|
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #177 +/- ##
==========================================
+ Coverage 92.74% 92.78% +0.03%
==========================================
Files 254 257 +3
Lines 32087 32480 +393
Branches 5344 5434 +90
==========================================
+ Hits 29759 30135 +376
+ Misses 1560 1559 -1
- Partials 768 786 +18
🚀 New features to boost your workflow:
|
antonwolfy
left a comment
There was a problem hiding this comment.
Review at c301aa6. The measure plumbing is clean: Holm is untouched, null and absent process are skipped, not zeroed, and the report JSON only gains a key. One bug at the edge, where only one arm carries process, and one test gap. One nit on the docs.
What I ran, on a Linux review host at c301aa6:
make ci-local: 20 passed, 8 failed, 7 skipped. The 8 failures (ruff, zizmor, pre-commit, bandit, mypy, deptry, mkdocs, pip-audit) exited 127, tools missing from my venv:make devstops at the tools install on this base, which #179 fixed onmain. Static checks, mypy and the strict docs build pass on GitHub's CI at this head. The test step passed: 7073 passed, 21 skipped. Changed-line coverage 100% (48 lines).- A reproduction of the
unpairedfinding, with no model or network access. - A mutation run on the new tests: 34 mutants, 10 of which pass the 4 new tests (see the inline comment on the test).
Checked, no issues
- Holm:
PRIMARYis still gate and score, and the process rows keepp_holmNone. - Scoping: only arms named in the compared selectors add process measures; there is no name clash with
metric:,scoreorcost_usd. - Values: bool, NaN, strings and a null
processare skipped;guidance_readcounts the list length. - Report:
summarizeonly adds aprocesskey per row; a row without it prints no extra line.
…ompare repo report gives each row the mean of every process count over the cells that have one; repo compare adds them as descriptive measures (process:<key>, counter:<name>), outside Holm's family. An absent or null process is skipped, so older batches compare as before. Signed-off-by: Nikolay Petrov <nikolay.a.petrov@intel.com>
…are's unpaired list When the baseline batch predates result.json process, every shared task became an unpaired entry for every process measure and hid the tasks that were really missing. A process measure an arm reports for no task is now left out. Pins the missing-value-is-not-zero mean and the selector scoping. Signed-off-by: Nikolay Petrov <nikolay.a.petrov@intel.com>
2614d0b to
621c00e
Compare
…t batch too The flood test covered only a baseline that predates process; a guard checking only the baseline arm passed every test. Parametrize over which arm lacks process. Signed-off-by: Alexander Rybkin <alexander.rybkin@intel.com>
|
antonwolfy
left a comment
There was a problem hiding this comment.
Review at f12b327. The one-arm flood is fixed and the guard now covers both arms. One test gap is left, on the first-rep case.
What I ran, on a Linux review host at f12b327:
make ci-local: 27 passed, 2 failed, 7 skipped. The changed-line coverage step passes.pip-auditfails on the lock files, which this PR does not touch.test_no_file_or_function_grew_past_its_baselinefails oncompare.py::_provenance_warnings(complexity 11, no baseline entry); that function is not in this diff and the same test fails on the PR's base.- A mutation run on the new tests: 28 mutants, 6 of which pass the whole new test file. The one that matters is inline.
- Reproductions of the one-arm and partial-count cases, with the LLM transport mocked.
I agree with @xaleryb that repo compare silently drops a count only the treatment (or only the baseline) reports, while contract §9, the changelog fragment and the compare.py docstring say each count a compared cell reports becomes a measure. The choice between rewording and a warning waits for the author, as does merging after #157.
Checked, no issues
- Holm: process rows keep
p_holmNone;PRIMARYis unchanged. - Values: a null or absent
processis left out of the per-task mean, not counted as zero; multi-model batches are handled per model. - Repo rules: no schema or persisted-format change, no new doc page, changelog fragment present.
Keep both docstring paragraphs in compare.py. Split _compare_model so the per-measure row moves to _compare_measure (complexity cap), and parametrize the missing-process test over which rep is null (first rep included). Signed-off-by: Nikolay Petrov <nikolay.a.petrov@intel.com>
Signed-off-by: Nikolay Petrov <nikolay.a.petrov@intel.com>
vchamarthi
left a comment
There was a problem hiding this comment.
No blockers. 2 non-blocking comments.
Earlier findings (one-arm unpaired flood, first-rep null, arm scoping) are fixed; two merge-order points remain before this can land.
-
Question: Is a rebase onto main planned? GitHub reports this PR as CONFLICTING (10 commits behind), so it cannot merge as is.
gh pr view 177at 4905eca: mergeStateStatus DIRTY, mergeable CONFLICTING;compare main...4905ecabehind_by 10. The _compare_model split into _compare_measure touches the area other recent compare.py changes also edit. (dokimi/dokimi/repos/compare.py:128)
CI at send time: 0 failing, 0 pending.
| - The report gives, per (task, arm, model), passes over finished cells with a | ||
| Wilson 95% interval (score-only tasks: the mean of `score.metric`), grader | ||
| failures (counted as failures too), missing cells, and mean cost and turns. | ||
| When cells carry `result.json` `process` (§4.1), a line under the row gives |
There was a problem hiding this comment.
Question: Should this be held until #157 merges? Until then main writes no process field, so report and compare show nothing, and the §4.1 reference in the contract resolves to a section that does not define it.
gh pr view 157: state OPEN. grep process on main's compare.py finds no process handling; the author and antonwolfy already agreed on merge-after-#157 in the thread on repo-evaluation-contract.md:1008.
Signed-off-by: Nikolay Petrov <nikolay.a.petrov@intel.com> # Conflicts: # dokimi/dokimi/repos/report.py
Signed-off-by: Nikolay Petrov <nikolay.a.petrov@intel.com>
A count one arm reports and the other does not (an older batch, a counter one arm added) was dropped from repo compare with no row, no unpaired entry and no warning. It is still not compared, but each (treatment, model) now gets one warning naming the counts it skipped; docs and changelog say so. Signed-off-by: Nikolay Petrov <nikolay.a.petrov@intel.com>
|
@xaleryb on your open point (a count only one arm reports, e.g. Merge order with #157: #157 is merged. dd3114f also merges current main. |
antonwolfy
left a comment
There was a problem hiding this comment.
LGTM. The one-arm warning does what the thread with @xaleryb asked for: one line per treatment and model, no per-task unpaired entries, and both arms are guarded. Merging main and #157 closes the contract reference. Two nits inline.
What I ran, on Linux at dd3114f:
make ci-local: 28 passed, 0 failed, 7 skipped (docker, conda, semgrep and the jobs that do not run on a PR). Changed-line coverage passes.- A mutation run on the new tests: 58 mutants, 42 killed. The ones that hide something are in the second inline comment.
- Reproductions with several models and treatments, the
--modelfilter and a baseline pooled from an old and a new batch, with the LLM transport mocked.
Checked, no issues
- Warning scope: with 2 models and 2 treatments there is one warning per (treatment, model) where exactly one arm reports a count.
--modellimits the warnings to the selected models. They show up in the--jsonwarningsand aswarning:lines in the text. - Holm and refactor: process rows keep
p_holmNone. The_compare_measuresplit leaves the gate, score, cost and turns rows unchanged. - Repo rules: contract §4.1 now defines
processand §2process_metrics. No schema covers therepo compareorrepo reportoutput, so no version bump.compare.pystays under its length limit and the growth ratchet passes.
Signed-off-by: Anton Volkov <antonwolfy@gmail.com>
Signed-off-by: Anton Volkov <antonwolfy@gmail.com>
…st has Both flood tests drop process from a whole arm, so a guard keyed on whether an arm has any process count, not this one, passed every test while the original case (both arms carry process, one adds a counter) listed each task as unpaired and warned nothing. Signed-off-by: Alexander Rybkin <alexander.rybkin@intel.com>
|
Part of #41 (follow-up to D4, #157).
Summary
repo reportandrepo comparenow show theresult.jsonprocesscounts. #157 (merged) adds those counts. The code readsprocessdefensively, so an absent ornullprocessis skipped and older batches report and compare as they do today.dokimi/repos/ +├── process_counts.py # process_values / process_means / process_order / process_line ├── report.py # row["process"] = per-arm means; one "process ..." line under the row └── compare.py # measures += process:<key>, counter:<name> (descriptive, not in Holm)process:{tool_calls,commands,failed_commands,denied_commands,guidance_read}(guidance_readis the number of paths read), pluscounter:<name>for each manifestprocess_metricscounter.compare, a counter becomes a measure when both arms report it for a shared task. If only one arm reports it (an older batch, or a counter only one arm added), it is not compared, and one warning per (treatment, model) names it. Values are per-task means over the cells that have the counter, with a t interval and a raw p, the same way as cost and turns.Evidence
repo compareshowed only gate/score/cost_usd/turns/metric rows.After: output on a synthetic batch:
tests/test_repo_process_counts.py(syntheticresult.jsonwith and withoutprocess): measure order and deltas,p_holmNone, null/absent skipped (not zero), non-counts ignored, report means and the single line. Fullpytest -q: 7072 passed;ruff check .andmypyare clean. No function's radon CC went up.Merge Danger
Door: two-way
The change only adds new keys and rows, and nothing is written to disk.
Blast Radius: narrow
A consumer that expects a fixed measure list in
repo compare --jsonwill see extra rows when cells carryprocess. There is a one-line import conflict with #153 incompare.py; it does not conflict with #155 or #157.🤖 Generated with Claude Code