Skip to content

fix: nautilus_plotter.py opts out of test mode and caps the search with n_like_max #149

Closed

Description

@Jammy2211

Overview

scripts/plot/nautilus_plotter.py fails under PyAutoHeart's release profile (PYAUTO_TEST_MODE=1): Nautilus test mode stops after the initial batch with one non-zero weight (ESS = 1), so the script's range=0.999 collapses corner's range to a sliver and it raises ValueError: ... 'range' is not valid or the sample is empty (run 33177898708, job integrate / run_scripts (3.12, autofit, plot)). PyAutoFit#1542 makes corner_cornerpy skip (logged) on such a sample instead of crashing, but the example should render a real corner plot. The human decided against raising the global test-mode budget in PyAutoFit (it would slow every release-wave search).

Plan

  • Declare ENV: real_search in the script's __Env__ section so the release runner releases PYAUTO_TEST_MODE for this one script.
  • Pass an explicit n_like_max to af.Nautilus, as other workspace examples do, calibrated to the smallest cap that yields a real posterior (corner rendered, ESS > parameter count) in a few seconds.
  • Regenerate the notebook per the workspace convention; verify under profile_release.yaml with output/ wiped.
Detailed implementation plan

Affected Repositories

  • autofit_workspace (primary)

Branch Survey

Repository Current Branch Dirty?
./autofit_workspace main clean

Suggested branch: feature/nautilus-plotter-real-search-cap

Implementation Steps

  1. scripts/plot/nautilus_plotter.py: append an __Env__ (Developer Only) section with ENV: real_search inside the final docstring (form per PyAutoHands/autohands/env_config.py); add n_like_max=<N> to af.Nautilus(...) with a one-line comment.
  2. Calibrate N ∈ {300, 500, 1000}: run under the release profile env (now with PYAUTO_TEST_MODE released) with output/ wiped each time; pick the smallest N that renders the corner (no skipping corner plot log line) — report calls/ESS/time.
  3. Regenerate notebooks/plot/nautilus_plotter.ipynb per the workspace's generation convention.
  4. Verify emcee_plotter.py still passes under the release profile (unchanged).

Key Files

  • scripts/plot/nautilus_plotter.py
  • notebooks/plot/nautilus_plotter.ipynb (generated)

Original Prompt

Click to expand starting prompt

Human decision on PyAutoFit#1542: "I dont want the TEST mode globally to be increased, that will slow down everything. Can we make it so these scripts dont use test mode and use the n_like_max input that other scripts use in order to enforce a custom number of capped samples?"

Activity

  1. Jammy2211 commented on Aug 28, 2026

    @Jammy2211
    CollaboratorAuthor

    Workspace PR created: #150 (pending-release; library-first gate on PyAutoFit#1542). Merge is a human decision.

  2. Jammy2211 commented on Aug 28, 2026

    @Jammy2211
    CollaboratorAuthor

    Shipped

    Merged: #150 (MERGED 2026-08-28), behind the library-first gate on PyAutoLabs/PyAutoFit#1542 (merged first).

    scripts/plot/nautilus_plotter.py now declares ENV: real_search in its __Env__ (Developer Only) section — the runner releases PYAUTO_TEST_MODE for this one script — and caps the search with n_like_max=3000. A plot example needs a real posterior, and the human declined raising the global test-mode budget in PyAutoFit.

    Calibration under profile_release.yaml with output/ wiped: 300 / 500 / 1000 calls still crash (N_eff = 1, Nautilus still exploring); 2000 renders no corner (N_eff = 3); 2500 renders at N_eff 13–20; 3000 gives N_eff 357–527 in 22–26 s, 3/3 stable; natural finish is 3500 calls / 35 s. emcee_plotter.py still runs under test mode (control, exit 0), and env resolution was checked directly: PYAUTO_TEST_MODE absent for this script, still 1 for its siblings.

    • scripts/plot/nautilus_plotter.py — n_like_max=3000, ENV: real_search
    • notebooks/plot/nautilus_plotter.ipynb — regenerated

    Record: PyAutoMind/complete/2026/08/nautilus-plotter-real-search-cap.md (library half: complete/2026/08/nautilus-test-mode-degenerate-corner.md)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions