fix: handle rejected final samples in test mode 1 - #1463
Merged
Conversation
This was referenced Aug 11, 2026
Jammy2211
marked this pull request as ready for review
August 11, 2026 02:56
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
Prevent
PYAUTO_TEST_MODE=1from finalizing a sampler point whose model reconstruction raisesFitException. Reduced searches now replace that rejected point with bounded, deterministic, fully validated representative samples, preserving valid result creation and downstream chaining while failing clearly when no valid representative exists.Fixes #1462.
API Changes
NonLinearSearch.fit()changes behavior only underPYAUTO_TEST_MODE=1: a final sample rejected withFitExceptionis replaced by valid representative test-mode samples. Normal searches, test modes 2/3, and non-FitExceptionfailures are unchanged.See full details below.
Test Plan
git diff --checkFull API Changes (for automation & release notes)
Changed Behaviour
autofit.non_linear.search.abstract_search.NonLinearSearch.fit()— underPYAUTO_TEST_MODE=1, validates the final summary instance and replaces aFitException-rejected result with bounded deterministic representative samples.FitException.Migration
Generated by the PyAutoLabs agent workflow.