Repository navigation
fix: guard MCMC thinning and short-chain autocorrelation - #1730
Merged
Merged
Conversation
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.
Short, well-mixed Emcee/Zeus chains could request thin=0 and crash; Emcee also tried to estimate previous autocorrelations from an empty chain. Clamp thinning to at least one and return an unavailable previous estimate for an empty history, so convergence remains false until there is evidence. Remove the check_size=5 workarounds from the real-sampler alignment tests.
Closes #1725.
API Changes
No signature or output-identifier changes. Chains with autocorrelation time below two use thin=1 (no thinning). This repairs previously failing runs; normal thinning and paired sample/log-probability ordering are unchanged.
Validation
Full library suite: 3922 passed, 1 skipped, 1 xfailed (Python 3.12.14). Focused MCMC tests: 14 passed, including real Emcee/Zeus reduced fits with default check_size=100. Additional real Emcee smoke: 10 walkers, 50 steps, test mode disabled, samples built and previous_times=None. Six new regression cases fail on unchanged main (zero thin and empty previous chain), while ordinary thinning remains unchanged. Author diff review passed.
No downstream API migration. The actual search.fit integration tests and real 50-step smoke exercise the changed paths; the six-workspace smoke matrix was not run. Required CI remains pending at PR creation.
Heart and authorization
User authorized "Find 4 grouped tasks and do them", then "Yes I authorise" after the RED gate was disclosed. Development PR only; no merge or release. Fresh published vitals: organism RED, PyAutoFit scope GREEN; local readiness STALE (fresh checkout has no release evidence). This does not repair or clear the organism's RED.
Disclosed RED reasons