From b2550a130559dc1253562e6a2c0097e7c31049d6 Mon Sep 17 00:00:00 2001 From: Jammy2211 Date: Fri, 28 Aug 2026 15:30:41 -0400 Subject: [PATCH] fix: nautilus_plotter.py runs a real capped search instead of test mode Under the release profile (PYAUTO_TEST_MODE=1) Nautilus stops after its first batch with one non-zero weight, so the script's range=0.999 collapsed corner's range to a sliver and corner raised "'range' is not valid or the sample is empty" (Heart release-integrate run 33177898708). The plot example needs a real posterior, so the script declares ENV: real_search (releases PYAUTO_TEST_MODE for this script only) and caps the search with n_like_max=3000, as other workspace examples do. Calibration (release profile, output wiped): 300/500/1000 calls still crash (exploration phase, N_eff 1); 2500 renders but at N_eff 13-20; 3000 gives N_eff 357-527 in 22-26 s (3/3); natural finish is 3500 calls / 35 s. Notebook regenerated with autohands generate.py (the __Env__ section is stripped from it). Upstream: PyAutoLabs/PyAutoFit#1542 (ESS corner guard). Closes #149 Co-Authored-By: Claude Fable 5 Claude-Session: https://claude.ai/code/session_01KeLmyZD5aG6BrTTdJzSmDv --- notebooks/plot/nautilus_plotter.ipynb | 1 + scripts/plot/nautilus_plotter.py | 14 ++++++++++++++ 2 files changed, 15 insertions(+) diff --git a/notebooks/plot/nautilus_plotter.ipynb b/notebooks/plot/nautilus_plotter.ipynb index 91125293..fb1fb30f 100644 --- a/notebooks/plot/nautilus_plotter.ipynb +++ b/notebooks/plot/nautilus_plotter.ipynb @@ -127,6 +127,7 @@ " path_prefix=\"plot\",\n", " name=\"NestPlotter\",\n", " n_live=100, # Number of so-called live points. New bounds are constructed so that they encompass the live points.\n", + " n_like_max=3000, # Caps the number of likelihood evaluations so this example completes quickly; remove for a full run.\n", ")\n", "\n", "result = search.fit(model=model, analysis=analysis)\n", diff --git a/scripts/plot/nautilus_plotter.py b/scripts/plot/nautilus_plotter.py index 353c1ee1..8db7dba6 100644 --- a/scripts/plot/nautilus_plotter.py +++ b/scripts/plot/nautilus_plotter.py @@ -57,6 +57,7 @@ path_prefix="plot", name="NestPlotter", n_live=100, # Number of so-called live points. New bounds are constructed so that they encompass the live points. + n_like_max=3000, # Caps the number of likelihood evaluations so this example completes quickly; remove for a full run. ) result = search.fit(model=model, analysis=analysis) @@ -135,4 +136,17 @@ __Plots__ Nautilus example plots are not shown explicitly below, so checkout their docs for examples! + +__Env__ (Developer Only) + +Not user documentation: this section configures the automated test harness. +The ENV line declares the environment applied when this script runs in CI +(PyAutoHands docs/env_profile_redesign.md ยง10); this whole section is +stripped from generated notebooks and markdown. + +The corner plots above need a real posterior: TEST_MODE stops nautilus after +its first batch, leaving one non-zero weight, which collapses the corner +range and raises. The `n_like_max` cap on the search keeps the run fast. + +ENV: real_search """