fix: catch SamplesException alongside FitException in database samples guide (PyAutoFit#1486) - #19
Merged
Conversation
…s guide (PyAutoFit#1486) PyAutoFit#1504 changed the user-visible type for stored-sample reconstruction failures from ModelParameterException (a FitException/ ValueError) to a typed SamplesException. This guide's errors_at_*_sigma harness guard caught only FitException, so it would miss the new type once that release lands. Both classes exist in released autofit, so this needs no pending-release hold. Co-Authored-By: Claude Fable 5 <[email protected]>
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
PyAutoLabs/PyAutoFit#1504 (merged) changed the user-visible type for stored-sample reconstruction failures from
ModelParameterException(aFitException/ValueError) to a typedaf.exc.SamplesException. This guide'serrors_at_*_sigmaharness guard caught onlyFitException, so once the next autofit release lands it would miss the new type. Widens the catch to(af.exc.FitException, af.exc.SamplesException)in the script and its generated notebook twin — the only affected catch site across all workspace repos (full sweep on PyAutoFit#1486).Scripts Changed
scripts/dataset_1d/advanced/database/examples/samples.py— catch tuple widened (line 286)notebooks/dataset_1d/advanced/database/examples/samples.ipynb— same change in the notebook twinTest Plan
py_compileon the script; notebook JSON validatedpending-releasehold is needed (same rationale as autogalaxy_workspace#210)Generated by the PyAutoLabs agent workflow.