Skip to content

fix(reportgen): warn when a kv_cache row hides a collapsed group or a failed run - #837

Closed
FileSystemGuy wants to merge 5 commits into
reportgen-column-parityfrom
fix/836-kvcache-collapsed-group
Closed

fix(reportgen): warn when a kv_cache row hides a collapsed group or a failed run#837
FileSystemGuy wants to merge 5 commits into
reportgen-column-parityfrom
fix/836-kvcache-collapsed-group

Conversation

@FileSystemGuy

Copy link
Copy Markdown
Contributor

Fixes #836.

A kv_cache row could be built from one of several runs in its workload group, chosen by filesystem-discovery order, with no indication on the row. A second, unrelated path let a run that lost most of its per-rank result files publish a row shaped exactly like a clean one.

Base is reportgen-column-parity (the integration branch) rather than main — these touch the same reportgen files the #826#829 stack rewrote.

What changed

Deterministic selection. _select_kvcache_run replaces runs[0]. Discovery order was genuinely arbitrary: of the three groups in the v3.0 tree holding two or more real runs, it published the earlier run for two and the later run for the third. Earliest run_datetime has no better claim than latest, but it is a rule rather than an accident, and it matches the positional convention Rules.md §2.1.17 already uses for training.

datasize excluded from selection. The kv_cache grouping key has no command component (D-05), so a datasize leaf lands in the same group as the run it sized. It writes no summary.json. An earlier draft of this change selected those leaves and blanked all twelve KVCache metrics on rows v3.0-0019 / 0021 / 0023 / 0142; the expectation diff caught it and it is now pinned by a test.

Two warnings on Result.issues. One when a row is built from a subset of its group, naming the published run and every dropped one; one when the published run recorded partial_failure, with the missing-file and failed-trial counts. The collapsed-group warning requires two or more actual run invocations, so ANL polaris-nvme's pair of datasize leaves stays quiet.

format_issues_list(show_all=False) now shows CLOSED warnings. The filter dropped every issue whose validation was CLOSED, conflating two orthogonal fields — validation is the submission category, severity is whether a human needs to look. Without this the new warnings reach only the log stream, since the fixed webpage-parity schema has no issues column. The datagen leaf-presence warnings, written to be "worth surfacing but not invalidating", had been invisible for the same reason and now print. Warnings are badged [WARN] in yellow rather than green [CLOSED], which on "row built from 1 of 3 runs" reads as approval; the stray None: placeholder is dropped for issues carrying no parameter.

Findings behind the change

The issue's original diagnosis was wrong on two counts; the correction is posted there in full.

crux-eagle is not a novel layout the tool failed to parse. Each run's metadata.result_dir records the path the tool wrote it to — crux-eagle, crux-eagle-n8, crux-eagle-n64, each canonical <system>/kv_cache/llama3.1-8b/run/<ts>/. Three system directories were merged into one at packaging time. Accepting the layout would not fix the collapse, because systemname is path-derived and all three still produce the same grouping key.

The two dropped runs are failed runs, not lost measurements: 8nodex8ppn is missing 403 per-rank result files (~70 %) and 64nodex8ppn 4473 (~97 %), both with 9 of 9 mpirun trials exiting non-zero. partial_failure and trial_failures are written by kvcache.py:919,960 and were read by nothing, which is the more general bug — open/farmgpu/.../llama3.1-70b-instruct/run/20260709_215001 publishes today missing 45 rank files.

Verification

Five commits, TDD RED→GREEN throughout. All four CI suites green: 3080 + 911 + 238 + 228 passed, 1 skipped, 0 failures.

Against the v3.0 tree the change produces 3 collapsed-group warnings (ANL crux-eagle 3 runs, Everpure 51hosts_20 and 51hosts_30 2 runs each) and 1 partial_failure warning, adding five lines to the printed summary — the four above plus one datagen leaf warning that had never been visible.

One published row moves: v3.0-0019 (Everpure 51hosts_20) switches from its later run to its earlier one, 85736 → 66113 tok/s and 11 other cells, because discovery order had picked the later run there. Which run represents a submitter's intended submission is not something the tool can know; that question is being raised with the three affected submitters in ApparentProblems.md alongside the results refresh.

…ure warnings

Two silent paths found in closed/ANL/results/crux-eagle:

1. Three runs shared one workload grouping key because the submitter
   flattened three system directories into one. `_aggregate_kvcache`
   takes `runs[0]` — filesystem-discovery order, not a rule — so the
   published values depend on iteration order, and the two dropped runs
   appear in no table. The only diagnostic was `No valid run directories
   found` against the workload directory, naming neither the row that
   was produced nor what was dropped.

2. `partial_failure` / `trial_failures` are written into summary.json by
   kvcache._write_run_summary and read by nothing. ANL's 8- and 64-node
   runs lost 70% and 97% of their per-rank result files with all 9
   mpirun trials exiting non-zero; open/farmgpu's llama3.1-70b-instruct
   row publishes today missing 45 rank files. Indistinguishable from a
   clean row.

The determinism test gives each run a distinct host_count so the pick is
observable — it currently fails `assert 64 == 1`, which is the ordering
dependency itself.
…rtial failures

Deterministic selection plus two warnings, on the evidence that the
crux-eagle case is not unique:

- `_select_kvcache_run` replaces `runs[0]`. Discovery order was genuinely
  arbitrary — of the three v3.0 groups holding two real runs, it
  published the earlier run for two and the later run for the third.
  Earliest `run_datetime` has no better claim than latest, but it is a
  rule rather than an accident.

- `_kvcache_measured_runs` excludes `datasize` from selection. The
  kv_cache grouping key has no `command` component (D-05), so a
  `datasize` leaf shares the group with the run it sized; it writes no
  summary.json. An earlier draft of this fix blanked all twelve KVCache
  metrics on v3.0-0019/0021/0023/0142 before the expectation diff caught
  it, which is now pinned by a test.

- Collapsed-group and partial_failure warnings ride on `Result.issues`.
  The collapsed-group warning requires two or more actual `run`
  invocations, so ANL polaris-nvme's pair of `datasize` leaves stays
  quiet.

Against the v3.0 tree: 3 collapsed groups (ANL crux-eagle 3 runs,
Everpure 51hosts_20 and 51hosts_30 2 runs each) and 1 partial failure
(open/farmgpu llama3.1-70b-instruct, 45 missing rank files). Six of the
seven collapses the first draft reported were datasize siblings, not
dropped measurements.

One published row moves: v3.0-0019 switches from its later run to its
earlier one, since discovery order had picked the later.

Refs #836
…ilter

format_issues_list(show_all=False) drops every Issue whose validation is
CLOSED, conflating two orthogonal fields: validation is the submission
category, severity is whether a human needs to look. A finding that does
not disqualify a CLOSED submission but does mean its published row is
misleading is exactly CLOSED + severity="warning".

Two families are invisible today — the datagen leaf-presence warnings,
written to be "worth surfacing but not invalidating", and the #836
kv_cache collapsed-group and partial_failure warnings. Both reach only
the log stream, alongside 183 other warnings.

Refs #836
…h a stray None

The badge is the first thing read, and a green [CLOSED] on "row built
from 1 of 3 runs" reads as approval of the row. The optional `parameter`
field also prints literally as "None: " when unset, which every #836
warning and every rules-strict INVALID message is.

Refs #836
… list

format_issues_list(show_all=False) now keeps CLOSED issues whose severity
is "warning", badges them [WARN] in yellow rather than green [CLOSED],
drops the "None: " placeholder when an issue carries no parameter, and
absorbs the message's own "[WARN] " lead-in so badges don't stack.

Ordinary CLOSED chatter still goes. Against the v3.0 tree this adds five
lines to the printed summary — the four #836 kv_cache warnings and one
datagen leaf-presence warning that had been written to be surfaced and
never was.

Refs #836
@FileSystemGuy
FileSystemGuy requested a review from a team as a code owner July 30, 2026 00:24
@github-actions

Copy link
Copy Markdown

MLCommons CLA bot All contributors have signed the MLCommons CLA ✍️ ✅

@FileSystemGuy

Copy link
Copy Markdown
Contributor Author

Closing — these commits belong directly on reportgen-column-parity, which is serving as the working main branch until the submission round completes. Pushed there instead.

@FileSystemGuy
FileSystemGuy deleted the fix/836-kvcache-collapsed-group branch July 30, 2026 00:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant