Skip to content

Visualization gallery notebook (not executed in CI) - #5

Merged
orgoca merged 1 commit into
mainfrom
docs/viz-gallery
Aug 16, 2026
Merged

Visualization gallery notebook (not executed in CI)#5
orgoca merged 1 commit into
mainfrom
docs/viz-gallery

Conversation

@orgoca

@orgoca orgoca commented Aug 16, 2026

Copy link
Copy Markdown
Owner

examples/04_visualization.ipynb — the rendered reference for compileml.viz.

Notebooks 01 and 03 show the plots in context using defaults. This one documents the options, which had no visual documentation anywhere:

  • waterfall arrow anatomy (adaptive heads, barbs) on a deliberately wide-spread decision
  • max_features truncation with the remainder bar closing the arithmetic exactly — printed next to the figure: -207418 == -207418
  • the depth>2 interaction residual drawn as its own bar — the first artifact in the repo to actually exhibit it
  • waterfall_svg rendered inline, byte-determinism shown
  • color_by outcome vs impact; value_color feature-value gradients including the non-obvious values= construction; sort_metric mean/sum/max
  • band-conditioned facets and target_band focus; band_ladder on cheap score-only payloads; restyling via colors=/labels=/ax=

CI: the notebook opts out of execution via metadata.compileml.ci_execute = false, read by run_notebooks.py. Declaring it in the notebook's own metadata means it survives renames and is visible to anyone opening the file. Rationale: tests/test_viz.py already covers every API shown, so CI execution would re-prove covered code — what the notebook adds is rendered evidence, and the committed figures double as visual-regression material in PR diffs.

Measured, for the record: the drivers were not the cost. 150 explained rows at 8 features is 0.18 s; the notebooks job spends its 111 s in sklearn teacher training. Skipping 04 saves roughly 10 s — the better argument for skipping is coverage, not time. Flipping it back is a one-line metadata change if you'd rather CI ran it.

Local gate green: ruff/black, full suite, mkdocs build --strict.

…of CI

examples/04_visualization.ipynb is the rendered reference for compileml.viz.
Notebooks 01 and 03 show the plots in context using defaults; this one
documents the options, which had no visual documentation anywhere:

- waterfall arrow anatomy (adaptive heads, barbs) on a wide-spread decision
- max_features truncation with the remainder bar closing the arithmetic
  exactly (printed alongside the figure: -207418 == -207418)
- the depth>2 interaction residual drawn as its own bar — first artifact in
  the repo to exhibit it
- waterfall_svg rendered inline, with byte-determinism shown
- color_by outcome vs impact; value_color feature-value gradients with the
  values= construction; sort_metric mean/sum/max
- band_conditioned facets and target_band focus; band_ladder on score-only
  payloads; restyling via colors=/labels=/ax=

The notebook opts out of CI execution via metadata.compileml.ci_execute,
read by run_notebooks.py — the declaration travels with the file, so it
survives renames and is visible to anyone opening the notebook. Every API it
demonstrates is already covered by tests/test_viz.py, so CI execution would
re-prove covered code; what the notebook adds is rendered evidence, and the
committed figures double as visual regression material in PR diffs.
@orgoca
orgoca merged commit c721d90 into main Aug 16, 2026
20 checks passed
@orgoca
orgoca deleted the docs/viz-gallery branch August 16, 2026 04:20
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