From ac161b9eed2b48b5809cf1504731f94e252bdd7c Mon Sep 17 00:00:00 2001 From: Jammy2211 Date: Wed, 2 Sep 2026 19:17:51 -0400 Subject: [PATCH] test(graphical): un-park analytic_gaussian_collapse.py and curate it into the smoke gate after PyAutoFit#1562 (#94) Co-Authored-By: Claude Fable 5.1 Claude-Session: https://claude.ai/code/session_01C49DeRHoKss4xBnz5F7gUm --- config/build/no_run.yaml | 5 ++--- .../graphical/analytic_gaussian_collapse.py | 20 +++++++++++++------ smoke_tests.txt | 1 + 3 files changed, 17 insertions(+), 9 deletions(-) diff --git a/config/build/no_run.yaml b/config/build/no_run.yaml index c223b35..61cbe8f 100644 --- a/config/build/no_run.yaml +++ b/config/build/no_run.yaml @@ -24,6 +24,5 @@ - graphical/ep_deterministic.py # NEEDS_FIX 2026-08-03 - EP parked as not release-ready alongside graphical/ep.py. Passes today, but shares the EP machinery whose message projection is unstable. See PyAutoFit #1332 F10. - graphical/ep_exact.py # NEEDS_FIX 2026-08-03 - EP parked as not release-ready alongside graphical/ep.py. Passes today, but shares the EP machinery whose message projection is unstable. See PyAutoFit #1332 F10. - graphical/ep_parity.py # NEEDS_FIX 2026-08-03 - EP parked as not release-ready alongside graphical/ep.py. Passes today, but shares the EP machinery whose message projection is unstable. See PyAutoFit #1332 F10. -- graphical/analytic_gaussian.py # NEEDS_FIX 2026-09-02 - autofit-EP column fails the closed form on an exactly Gaussian graph (D1 id-0 prior/FactorValue collision, D2/D3 Laplace projection); closed form, minimal EP and graphical joint fit agree. Re-enable when autofit_workspace_test#91's PyAutoFit prompts land. See PyAutoFit #1405. -- graphical/analytic_gaussian_priors.py # NEEDS_FIX 2026-09-02 - autofit-EP column fails the closed form for every hyper-prior family (D2 Laplace covariance, D4 truncation limits dropped, D5 log-space transform lost in projection); minimal EP matches the closed form. Re-enable when autofit_workspace_test#91's PyAutoFit prompts land. See PyAutoFit #1405. -- graphical/analytic_gaussian_collapse.py # NEEDS_FIX 2026-09-02 - phase-2 collapse configuration fails on silent STALE / BIASED-TIGHT scatter with no library warning (D2 Laplace covariance, D3 failed line search still projects, D4 truncation limits dropped); closed form is exact. Re-enable when autofit_workspace_test#91's PyAutoFit prompts land. See PyAutoFit #1405. +- graphical/analytic_gaussian.py # NEEDS_FIX 2026-09-02 - autofit-EP column fails the closed form on an exactly Gaussian graph (D1 id-0 prior/FactorValue collision, D2/D3 Laplace projection); closed form, minimal EP and graphical joint fit agree. D1/D4/D5/D2-D3 landed (PyAutoFit#1558/#1560/#1562); remaining misses are the Laplace-on-scatter caveat (autofit/graphical/README.md §3.5) — re-enable when the moment-matching cure (PyAutoMind draft/feature/autofit/ep_hierarchical_scatter_moment_matching.md) lands. See PyAutoFit #1405. +- graphical/analytic_gaussian_priors.py # NEEDS_FIX 2026-09-02 - autofit-EP column fails the closed form for every hyper-prior family (D2 Laplace covariance, D4 truncation limits dropped, D5 log-space transform lost in projection); minimal EP matches the closed form. D1/D4/D5/D2-D3 landed (PyAutoFit#1558/#1560/#1562); remaining misses are the Laplace-on-scatter caveat (autofit/graphical/README.md §3.5) — re-enable when the moment-matching cure (PyAutoMind draft/feature/autofit/ep_hierarchical_scatter_moment_matching.md) lands. See PyAutoFit #1405. diff --git a/scripts/graphical/analytic_gaussian_collapse.py b/scripts/graphical/analytic_gaussian_collapse.py index d9bf6fd..b0d7ca2 100644 --- a/scripts/graphical/analytic_gaussian_collapse.py +++ b/scripts/graphical/analytic_gaussian_collapse.py @@ -53,7 +53,7 @@ script ends `COLLAPSE CONFIG: PASS|FAIL (k/n seeds)` and exits 1 on failure; the per-seed table is the evidence banked for phase 2, whichever way it falls. -__What the first run showed (seeds 0-4, 2026-09-02, PyAutoFit 2026.8.17.1; ~35 s)__ +__What the first, pre-fix run showed (seeds 0-4, 2026-09-02, PyAutoFit 2026.8.17.1 before #1558/#1560/#1562; ~35 s)__ seed 0 STALE 10.00 +/- 3.69 (closed form 6.57, [q05, q95] = [2.98, 12.15]); 10/10 BAD_PROJECTION seed 1 RECOVER 7.94 +/- 1.34 (closed form 10.46, [6.26, 15.99]) @@ -66,13 +66,21 @@ on the same seed-0 data does collapse to a biased-tight 3.7 +/- 0.75, and depending on process history to sigma ~ 1e-4 with the library's scale-collapse warning. +__What the same run shows on PyAutoFit main 5375f4d63 (#1558/#1560/#1562 merged; 2026-09-02, ~17 s)__ + + seed 0 RECOVER 9.24 +/- 3.61 (closed form 6.57, [q05, q95] = [2.98, 12.15]) + seed 1 RECOVER 10.73 +/- 3.21 (closed form 10.46, [6.26, 15.99]) + seed 2 RECOVER 13.35 +/- 2.92 (closed form 13.57, [9.22, 18.94]) + seed 3 RECOVER 13.88 +/- 2.88 (closed form 14.35, [10.00, 19.65]) + seed 4 RECOVER 12.21 +/- 3.03 (closed form 12.48, [8.17, 17.89]) + +COLLAPSE CONFIG: PASS (5/5 seeds): every seed's E_EP[sigma] is a posterior (HierarchicalFactor +SUCCESS on every seed) inside the closed-form [q05, q95]; no library warning is needed or emitted. + __Status__ -Parked NEEDS_FIX 2026-09-02 in `config/build/no_run.yaml`: the autofit-EP column fails against the -closed form because of the PyAutoFit defects tracked under PyAutoFit#1405 / autofit_workspace_test#91 -(D2/D3/D4: silent STALE / BIASED-TIGHT scatter). The script is intentionally left exit-1-on-fail as -the regression check that turns green with the fix; the closed form is exact, and the minimal EP and -graphical columns of its sibling `analytic_gaussian.py` pass. +Curated into the smoke gate since 2026-09-02: with PyAutoFit#1558/#1560/#1562 every seed reads +RECOVER; a SILENT, STALE or PATHOLOGICAL verdict is a regression. """ diff --git a/smoke_tests.txt b/smoke_tests.txt index b0494a6..b04dca1 100644 --- a/smoke_tests.txt +++ b/smoke_tests.txt @@ -11,3 +11,4 @@ model_composition/model_composition.py graphical/shared_state.py graphical/analytic_reference.py graphical/analytic_ep_minimal.py +graphical/analytic_gaussian_collapse.py