Skip to content

List each timed operation as its own benchmark row - #519

Merged
godofecht merged 2 commits into
mainfrom
feat/489-operation-rows
Nov 20, 2026
Merged

godofecht merged 2 commits into
mainfrom
feat/489-operation-rows

Conversation

@godofecht

@godofecht godofecht commented Nov 19, 2026 •

Copy link
Copy Markdown
Owner

Part of #489. Part of #478.

What changed

benchmarks/operation_rows.json lists every timed operation as its own row. The headline benchmark times two stages per estimator and dataset, so each gets a row: fit, and the prediction stage (predict, or transform for PCA).

Row fields: sklearn_median_ms, flow_median_ms, sklearn_iqr_ms, flow_iqr_ms, speedup, status, parity_status, prerequisites_met, tracking_issue. Counts are given per operation. every_measured_operation_wins is the #478 exit criterion evaluated over operations.

  • generate_operation_rows.py builds the file from headline_result_v2.json. --check fails when the committed file differs from a fresh build.
  • operation_loss_issues.json maps each losing operation to its focused issue.
  • publish_headline_v2.py validates the file (counts, one fit row and one prediction row per headline row, source digest) and copies it to Pages.
  • docs/benchmarks.html shows the table, losses first.
  • Workflow lines only, in existing steps: flow.yml validate step runs the test and the check, and remaining-issues.yml rebuilds the file in the existing "Sync published claims" step. No new workflow, and no generated file other than the new one is touched, so this does not conflict with freeze commits.

Finding

Reproduced on main at f1ed528: LinearSVC Digits predict is 0.176 ms on Flow against 0.107 ms on scikit-learn (0.61x), inside an estimator total that is a Flow win. It is below 1x in four of the last six freezes. Filed as #518 and linked from the row.

The losses named in the issue (GaussianNB Digits predict, RandomForest Digits fit, KernelRidge, KernelSVC) are already Flow wins at the operation level in this freeze: 37 wins, 1 loss and 0 ties over 38 timed operations. Digits KernelSVC fit is 1.11x, the narrowest win.

Not covered

  • predict_proba and decision_function are not timed by the headline benchmark. They are listed with status not measured (18 rows) and are not given numbers. Timing them needs new Flow benchmark code.
  • Prerequisites use the headline row's parity status. Per-operation learned-state parity is not recomputed here.
  • The file is not part of the digest check in Reject derived evidence built from an older headline result #517. After both merge, adding it there is a one-line change.

Tests

Before, on main: python benchmarks/test_generate_operation_rows.py fails with ModuleNotFoundError: No module named 'generate_operation_rows'.
After: the same command passes 13 of 13 checks, including a synthetic result whose total is a Flow win while predict loses (the row is listed, links its issue, and a zero-resolution timing is unresolved instead of a win), and a rejection of an edited operation_rows.json.
python benchmarks/generate_operation_rows.py --check and python benchmarks/publish_headline_v2.py --check pass.
Pages table checked in headless Chromium against a local server: the section renders 56 operation rows plus the existing tables, the loss row shows #518, and the page logs no errors.
python tools/run_all.py (pinned Flow 88aac509, macOS, FLOW_OPT_LEVEL=0): passed 119/119.

operation_rows.json holds one row per timed operation: fit, and the
prediction stage (predict, or transform for PCA). Each row has median and IQR
for both implementations, speedup, status, the parity prerequisite and, for a
loss, a tracking issue. Operations the headline benchmark does not time are
listed as not measured. The file is built from headline_result_v2.json, checked
in the Flow workflow, rebuilt at freeze, validated and published to Pages,
which shows the table.

The first loss this exposes is LinearSVC Digits predict at 0.61x inside a
total Flow win. It is tracked in #518.
@godofecht
godofecht merged commit c5fadd0 into main Nov 20, 2026
11 checks passed
@godofecht
godofecht deleted the feat/489-operation-rows branch November 20, 2026 01:28
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