Visualization gallery notebook (not executed in CI) - #5
Merged
Conversation
…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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
examples/04_visualization.ipynb— the rendered reference forcompileml.viz.Notebooks 01 and 03 show the plots in context using defaults. This one documents the options, which had no visual documentation anywhere:
max_featurestruncation with the remainder bar closing the arithmetic exactly — printed next to the figure:-207418 == -207418waterfall_svgrendered inline, byte-determinism showncolor_byoutcome vs impact;value_colorfeature-value gradients including the non-obviousvalues=construction;sort_metricmean/sum/maxtarget_bandfocus;band_ladderon cheap score-only payloads; restyling viacolors=/labels=/ax=CI: the notebook opts out of execution via
metadata.compileml.ci_execute = false, read byrun_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.pyalready 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.