Skip to content

fix(bench): decode-history graph plotted prefill runs as decode points - #104

Merged
thinmintdev merged 1 commit into
masterfrom
fix/bench-history-display-dims
Aug 10, 2026
Merged

fix(bench): decode-history graph plotted prefill runs as decode points#104
thinmintdev merged 1 commit into
masterfrom
fix/bench-history-display-dims

Conversation

@thinmintdev

Copy link
Copy Markdown
Contributor

The bug

/v1/history (added in #63) filtered on model_id and lane only. A model normally has pp (prefill) records alongside its tg (decode) ones under the same model_id and lane, and a pp record carries no decode figure at all — so the run drawer's "decode history" sparkline was plotting a series that was partly prefill runs.

Measured against real CT105 data:

MiniCPM5-1B — total points: 8
  by kind: {'pp': 4, 'tg': 4}
what the drawer SHOULD plot (tg+default+ok): 4
what the endpoint returned:                  8

Different config_labels are the same apples-to-oranges problem: two configurations of a model, not successive measurements of one.

The fix

/v1/history gains optional kind and config filters; the drawer pins both — kind=tg, and config to the row's own variant. Filters stay optional, so the CLI-shaped ?cell_key= form is unaffected.

Why display dimensions and not cell_key

A cell is exactly "one comparable series", so filtering by cell_key looks like the obvious answer. It isn't: cell_key is content-addressed over engine/image provenance, so an unrelated runner-image bump between two sweeps forks the key and shatters one continuous history into several one-point series. hal0's own dashboard moved off cell_key for this reason. It stays available as an explicit filter for callers that genuinely want that one identity.

How it got through

My miss in #63. The endpoint's tests seeded one record per model, so no test had a pp row available to leak into a series. I also saw the symptom during end-to-end verification — a first point of {"decode_ts_med": null, "prefill_ts_med": 6951.18} — and read past it.

Both filters are now covered by tests.

Verification

  • worker: 81 tests pass (was 79), typecheck clean
  • site: 223 pass, 0 skipped after npm run build
  • confirmed kind:"tg" ships in the built island bundle, not just the source

🤖 Generated with Claude Code

/v1/history filtered on model_id and lane only, but a model normally has pp
(prefill) records alongside its tg (decode) ones under the same model_id and
lane — and a pp record carries no decode figure at all. The run drawer's
"decode history" sparkline was therefore plotting a series that was partly
prefill runs. Measured against real CT105 data: MiniCPM5-1B returns 8 points
for model+lane, only 4 of which belong on the graph.

Different config_labels are the same apples-to-oranges problem — two
configurations of a model, not successive measurements of one.

The endpoint gains optional `kind` and `config` filters and the drawer pins
both: `kind=tg`, and `config` to the row's own variant. Filters stay optional
so the CLI-shaped ?cell_key= form is unaffected.

Filtering by display dimensions rather than by cell_key is deliberate even
though a cell is exactly "one comparable series": cell_key is
content-addressed over engine/image provenance, so an unrelated runner-image
bump between sweeps forks the key and shatters one continuous history into
several one-point series. hal0's own dashboard moved off cell_key for this
reason. cell_key remains available as an explicit filter.

Missed in #63 — the endpoint's own tests seeded one record per model, so no
test had a pp row to leak. Both filters are now covered.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@vercel

vercel Bot commented Aug 10, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
hal0-web Ready Ready Preview Aug 10, 2026 8:13am

@cloudflare-workers-and-pages

Copy link
Copy Markdown

Deploying hal0-web with  Cloudflare Pages  Cloudflare Pages

Latest commit: 0af5049
Status: ✅  Deploy successful!
Preview URL: https://f02a986a.hal0-web.pages.dev
Branch Preview URL: https://fix-bench-history-display-di.hal0-web.pages.dev

View logs

@thinmintdev
thinmintdev merged commit 314899f into master Aug 10, 2026
12 checks passed
@thinmintdev
thinmintdev deleted the fix/bench-history-display-dims branch August 10, 2026 08:16
thinmintdev added a commit that referenced this pull request Aug 10, 2026
Two comment blocks outlived #63 and #104 — normalizeHistoryPoints' docstring
and the run-drawer graph note both described /v1/history as proposed and
adapter-only, and the docstring listed the old display dims (kind/outcome
hardcoded) rather than the kind/config the caller now pins. Comments only,
no behaviour change.

Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
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