Repository navigation
Bound Nautilus sampling time across updates - #1793
Merged
Merged
Conversation
Collaborator
Author
|
Workspace PR: Euclid #140 applies this budget to each non-VIS band, consumes the two termination reasons and flags capped fits in the catalogue. The pipeline's 511 fast tests and nine smoke scripts passed locally. The real tile rerun is tracked in Euclid #136. |
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.
Summary
A single slow Euclid waveband can exhaust its tile’s 12-hour job allocation. PyAutoFit now lets a Nautilus fit share one time budget across sampler updates. This is the library change for Euclid #136.
API Changes
af.Nautilus(timeout=seconds)accepts a finite positive time budget. The default remains unbounded. Nautilus checks time between batches, so an in-flight likelihood evaluation or bound update can finish after the deadline. An intermediate PyAutoFit update spends the same budget. Setup and finalization sit outside the sampling deadline.When a budget stops sampling with usable samples,
result.samples.samples_info["termination_reason"]recordstimeoutorn_like_max. A cap before any posterior samples raisesaf.exc.SearchBudgetExceeded, exposes the same reason and leaves the model editable. Ordinary convergence takes precedence when it coincides with a limit.Test Plan
Exercised the real Nautilus sampler with a controlled clock on Python 3.13, including zero and one completed batch, both CPU paths, archived metadata and a recoverable empty result. Checked shared deadlines across updates, convergence coincident with a cap, existing unbounded calls and legacy identifiers. The Nautilus and single-CPU modules passed 34 tests with one expected failure. The focused Python 3.12 budget cases passed all 14 tests.
Ran a real two-band plateau-plus-spike experiment through the proposed Euclid consumer at a reduced 50-call budget. Both bands returned partial samples and emitted the correct cap status.
Independent review identified a frozen model after the empty-posterior exception. The fix and regression are included.
Covered the full 4,328-case PyAutoFit collection across successive runs. After updating the API expectations and keeping the search module within its existing line limit, all failed cases passed on rerun. Two tests skipped and one expected failure remained. Final Nautilus and conformance verification: 141 passed and one expected failure.
Scoped Heart dev-ship gate: GREEN. Advisories: PyAutoFit: 4 commit(s) behind origin; PyAutoGalaxy: 4 commit(s) behind origin; PyAutoLens: 4 commit(s) behind origin; test run status unknown (no report.json); release validation incomplete: no rehearsal for current source.
Full API Changes (for automation & release notes)
Added
af.Nautilus(timeout=None)accepts an optional budget in seconds.af.exc.SearchBudgetExceededis a subclass ofSearchException. Itstermination_reasonidentifies the exhausted budget when there is no posterior.Samples.samples_info["termination_reason"]records the reason for early budget termination when there are samples.