Repository navigation
fix(infer-18,#6927): Plotly CDN bar+marker -> SVG inline Bar (cp posterior) - #6985
Merged
Merged
Conversation
…e cp posterior) cell[8]: P(cp=t) posterior histogram (100 bars, Infer.NET Discrete) -> SvgChartHelper.Bar(). Mode (MAP = argmax = estimated true change-point) = peak bar + explicit Console.WriteLine. PlotlyHtml formatter setup dropped (only cell using it; verified). pmax/masses-table/mode computation preserved. Helper co-located in Probas/Infer/ -> bare #load resolves natively. Gates firsthand: exec_count=4, #6959=0, #6971=0, #6931 Infer-18 cleared, cdn=false, C.3 [8]. See #6927. SOTA-OK (#3801 Prong-A). Co-Authored-By: Claude-Code <noreply@anthropic.com>
Contributor
Notebook PR Validation: PASS
Checks: H.1 (no errors), H.3 (execution_count), C.1 (no banned patterns) |
Contributor
Golden-Set Execution (H.7 P3)✅ 8/8 notebooks passed (certified reproducible)
Pinned lockfile: |
This was referenced Jul 17, 2026
myia-ai-01
pushed a commit
that referenced
this pull request
Jul 17, 2026
…ne helper-load (mirror #6978 canon) (#6990) * ci(notebook-tools,#6927): SVG empty-display gate — wire #6971 detector as per-PR gate Per-PR CI gate that runs scripts/notebook_tools/detect_svg_empty_display.py in --check mode on every notebook changed by the PR and FAILs if any cell commits an empty display (chart-display pattern in source + execution_count set + outputs==[] = white figure on GitHub/nbviewer). Why this gate (mirror of svg-decimal-comma-gate.yml #6965) ---------------------------------------------------------- The SVG inline rollout #6927 has TWO failure modes that both render as broken/blank on GitHub but require DIFFERENT detectors because they inspect different layers: 1. SVG emitted with French decimal commas (content defect) -> detect_svg_decimal_commas.py (#6959) parses SVG payload -> svg-decimal-comma-gate.yml (#6965) wires it as per-PR gate -> RENDERS BROKEN (zigzag, "Expected length" errors) 2. Cell commits an empty `outputs` list despite a chart-display pattern in source (pipeline defect) -> detect_svg_empty_display.py (#6971) inspects cell structure -> svg-empty-display-gate.yml (THIS PR) wires it as per-PR gate -> RENDERS BLANK (no SVG at all to parse) Both gates are NEEDED, neither is sufficient. PR #6963 (DecInfer-6, po-2025 fr-FR) committed 4 cells (29/35/45/49) with the empty-output defect. Both `svg-decimal-comma-gate` and `check_plotly_static_risk.py` passed (the SVG was never emitted, so there were no decimal-commas to find; the source had no Plotly-CDN script). Result: 4 white figures on GitHub, invisible to code review and structural validation. Detected by vision-QA only. This gate would have caught it pre-merge. Verification (mirror of #6965 methodology): - YAML parses cleanly (yaml.safe_load). - Detector CLI returns TN baseline 930/0 (matches #6971 claim). - Synthetic TP (cell with display(SvgChartHelper.Bar(...)) + exec_count set + outputs==[]) -> detector exit 1 (caught). - TN (clean notebook with real SVG output) -> detector exit 0. - Edge: missing file path -> detector exit 2 (handled as ::warning). - Workflow branch logic identical to svg-decimal-comma-gate.yml (`[ "$rc" -eq 1 ]` fail / `[ "$rc" -eq 2 ]` warn / `::notice` clean). Scope: - 1 file, +171/-0. - Workflow YAML static, no re-exec needed. - Mirror of svg-decimal-comma-gate.yml #6965 (same step sequence, same permissions, same per-PR diff scope, same exit-code handling). - Paths trigger: notebook changes + detector changes + gate changes. Closes gap in CI coverage for #6927 rollout: helper canon SvgChartHelper.cs + detector 1 (#6959) + gate 1 (#6965) + detector 2 (#6971) + gate 2 (this PR) = 5/5 chain complete. EPIC #3801 axe-2 SOTA enforcement. ai-01 explicit greenlight on CoursIA-2 dashboard 2026-07-17T04:52Z: "Follow-up po-2024 (ton next-step) : gate CI soeur #6971 (mirror #6965) = greenlight ta lane defense-in-depth." Co-Authored-By: Claude-Code <noreply@anthropic.com> * fix(notebook-tools,#6927,#6981): gate FIX-prose leads with cause-racine helper-load (mirror #6978 canon) ai-01 CHANGES_REQUESTED (review PRR_kwDOH2Odns8AAAABGVBAAg) sur #6981 : le mécanisme du gate (détection 3-condition, wiring mirror #6965) est correct et validé firsthand, MAIS le FIX-prose imprimé aux workers sur échec embarque la théorie §4 RÉFUTÉE (« make the chart the LAST EXPRESSION, drop display() »). Preuve firsthand : MERGED #6967 DecInfer-7 cell[32] utilise display() et capture le <svg> (26 outputs) ; display() ET last-expression rendent TOUS DEUX quand le helper est chargé. La vraie cause du vide = helper/Formatter non chargés (#load non résolu depuis cwd réel du nbclient, Formatter.Register jamais exécuté, SvgChartHelper.<chart> falls through à no-op). Cette PR est le miroir exact de la correction portée par #6978 (MERGED sur le détecteur detect_svg_empty_display.py docstring/FIX) appliquée au gate YAML : cohérence tool + gate avec le canon corrigé. Edits prose-only (1 file +15/-14, 0 logique) : 1. L28 « display()-vs-return pitfall » → « helper/Formatter-not-loaded pitfall (#load unresolved from exec cwd) » + cross-ref svg-6927-canon.md §4. 2. L62-80 « Fix (mirror ... point 1) » → « Fix (mirror ... §4 cause-racine helper-load) ». Suppression de « Make the chart the LAST EXPRESSION » comme fix (la cause-racine prime). Suppression de (C) « display() captures display_data only for SOME object types » (qui impliquait display-vs-). Conservation de (A) cwd-kernel et (B) Formatter.Register comme les deux vraies causes. Ajout preuve display() rend quand helper chargé (ref #6967). 3. L168 (le $GITHUB_STEP_SUMMARY réellement lu par un worker sur échec) « FIX: make the chart the LAST EXPRESSION ... (point 1) » → « FIX: the empty outputs list means the helper's Formatter.Register did NOT run in this exec — ... the discriminator is helper-load, NOT display-vs-expression. See svg-6927-canon.md §4 (cause-racine helper-load) and the detector docstring. » Wiring inchangé : 3 steps (checkout@v4 fetch-depth 0 / setup-python@v5 3.11 / gate inline), permissions contents:read, paths scope, branch logic (rc=1 ::error / rc=2 ::warning / else notice), stdlib-only deps detector. yaml.safe_load OK ; structure identique à svg-decimal-comma-gate.yml #6965. Validation : - YAML structure préservé (jobs=1 svg-empty-display, steps=3, first step actions/checkout@v4, last step Gate changed notebooks). - 0 occurrence de « LAST EXPRESSION » (grep -n verify). - « §4 / svg-6927-canon / Formatter.Register / helper-load » canon refs présentes L28, L64, L66, L71, L77, L80, L169. - Diff +15/-14 atomique sur 1 file (workflow YAML), 0 autre fichier touché. Pre-flight collision scan L539-L1 ★★★ : - origin/feature/c635-svg-empty-display-ci-gate (= PR #6981 base) ✓ - origin/feature/svg-empty-display-detector-3801 (= #6971 MERGED) ✓ - origin/feature/svg-emptydisplay-fixguidance (= PR tierce docstring FIX) ✓ - origin/docs/svg-6927-mergegate-readme (= PR tierce README sequence, NOUVELLE tierce : cible = docs/notebook_tools/*.md, pas workflow YAML = PAS COLLISION) - main a avancé dbe6df1..365486c (Heatmap #6982 + Infer-19 #6983 + Sudoku accents #6984 + Infer-18 #6985) — pas de conflit (workflow YAML indépendant du contenu notebooks). References : - Closes intent of CHANGES_REQUESTED PRR_kwDOH2Odns8AAAABGVBAAg (ai-01) - Mirror #6978 (MERGED detector docstring/FIX correction) - See #6967 (DecInfer-7 display() proof that helper-load is discriminator) - See #6971 (companion detector MERGED) --------- Co-authored-by: Claude-Code <noreply@anthropic.com>
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.
What
Probas/Infer/Infer-18-Change-Point.ipynbcell[8]: replace blank-in-static Plotly chart with inline static SVG viaSvgChartHelper.Bar()(#6942 + #6958 MERGED).Discrete posterior P(cp=t) over the change-point location t=0..99 (Infer.NET
Discrete cpPost, N=100) — 100-bar histogram. The mode (MAP = argmax of the posterior, the estimated true change-point) is the peak bar, and is also printed explicitly viaConsole.WriteLine.Why Bar() (not Overlay)
The original Plotly was a bar histogram + 1 red triangle marker at the mode. The helper
Bar()covers the histogram; the mode is naturally the tallest bar (visually self-evident), and the explicitConsole.WriteLine($"Mode (MAP, vrai point de rupture estime) : t={mode} ...")preserves the "vrai point de rupture" pedagogy the red triangle conveyed. No new primitive needed; the marker-on-bar combo collapses cleanly into Bar() + Console.The distribution shape (posterior concentrated near the true cp) + the peak = mode is the pedagogical point that must render on GitHub.
Family rotation (R6)
Continuing the Probas/Infer rotation (home turf, .NET). Same EPIC (#6927), same family as Infer-19 (#6983) — helper co-located → bare
#loadresolves natively.#loadresolves natively hereBare
#load "SvgChartHelper.cs"resolves without anExecutePreprocessorpath override — the helper is co-located inProbas/Infer/(same folder as the notebook), so kernel CWD = notebook dir = helper dir (cf c.563 empirical#loadtruth: resolves relative to notebook dir).Surgical full-cell replace
cell[8] held the
record PlotlyHtml+Formatter.Registersetup block and the chart (only cell usingPlotlyHtml— verified: 9 code cells, only cell[8] references it). So the entire cell source is replaced: setup dropped, computation preserved byte-for-byte (pmax, masses-tableConsole.WriteLine,mode/modeMassargmax), chart swaps toBar().Gates verified firsthand
.net-csharpexec (H.4)detect_svg_decimal_commas.py(#6959, merge-gate)F()=InvariantCulture)detect_svg_empty_display.py(#6971, no-vision blank-gate)check_plotly_static_risk.py(#6931)cdn.plotlyin output<rect>(100 bars + axis/legend)Verdict: SOTA-OK (#3801 Prong-A)
Notes
🤖 po-2025 (GLM no-vision lane)