Skip to content

fix: avoid redundant Nautilus completion pass - #1652

Merged
Jammy2211 merged 1 commit into
mainfrom
feature/ep-nautilus-single-pass
Sep 30, 2026
Merged

Jammy2211 merged 1 commit into
mainfrom
feature/ep-nautilus-single-pass

Conversation

@Jammy2211

Copy link
Copy Markdown
Collaborator

Summary

Nautilus searches that converged with new posterior samples previously performed an unnecessary intermediate result update and a second no-op sampler call. Use Nautilus's convergence return value to finish immediately, and advance finite update budgets using the cumulative likelihood count instead of posterior sample counts. Global limits also stop when a batch overshoots them.

Closes #1651.

API Changes

No argument or signature changes. Converged searches skip the redundant intermediate update; finite update cadence and global limits count likelihood evaluations correctly. No workspace migration is required.

Test Plan

  • Targeted Nautilus tests: 16 passed, including 8 new convergence/budget cases.
  • All 8 new regression cases fail against the original methods.
  • Full serial PyAutoFit suite: 2934 passed, 2 skipped (300.23 s).
  • Seeded real Nautilus fits (seeds 13 and 14): sampler calls 2 → 1 and intermediate updates 1 → 0; posterior parameters, likelihoods and weights bit-identical to the original wrapper.
  • Timing caveat: these two small runs do not establish a wall-time speedup (5.47–6.04 s baseline, 5.68–6.15 s fixed, with concurrent suite activity).
  • Instrumented repeat: the removed intermediate update took 68–75 ms per search; seeded samples remained bit-identical. Total timing differences are noisy, so no end-to-end speedup is claimed.
  • Downstream smoke: 160 scripts and 6 notebooks passed, zero failures, across autofit, autogalaxy, autolens, autolens_test, euclid, howtolens, autocti and autocti_test. Each workspace used its isolated Heart environment and disposable checkout with this branch's PyAutoFit source.
Full API Changes (for automation & release notes)

Changed Behaviour

  • Nautilus.call_search finishes on the sampler's successful run() return without an extra update/run cycle, and recognizes batch overshoot of a global likelihood limit.
  • Nautilus.iterations_from derives cumulative budgets from Sampler.n_like, including the true current call count for NullPaths searches.

Migration

  • None.

Generated by the PyAutoLabs agent workflow.

Heart RED development-only override

After the exact RED reasons were reported, the human authorized this task: "yeah, and then do a $prm". This permits development commit/push/PR and a same-turn merge only after every required CI check passes. It does not authorize a release or bypass a failing check.

Heart RED reasons: PyAutoFit: 1 commit(s) behind origin; PyAutoLens: 1 commit(s) behind origin. These describe canonical checkouts; this task is based on current PyAutoFit origin/main. Passed branch gates are listed above.

@Jammy2211 Jammy2211 added the pending-release PR queued for the next release build label Sep 29, 2026
@Jammy2211
Jammy2211 merged commit 5cf687d into main Sep 30, 2026
4 checks passed
@Jammy2211
Jammy2211 deleted the feature/ep-nautilus-single-pass branch September 30, 2026 08:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pending-release PR queued for the next release build

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix: avoid redundant Nautilus completion pass

1 participant