test: add the af.NSS searches integration script - #86
Merged
Conversation
Integration coverage for the re-mainlined af.NSS nested slice sampler (mainline blackjax >=1.6): the standard 1D Gaussian cell with use_jax=True, truth-recovery + finite-logZ + ensemble-error + ESS asserts, and a second fixed-seed run through the chunked GPU-memory path (chunk_size < num_delete) asserting bit-parity of the evidence with the unchunked run. Validated against the PyAutoFit#1492 branch on CPU: direct run (logZ -72.158 +/- 0.422, evals 30,784, ESS 417) and PYAUTO_TEST_MODE=1 (logZ -72.164, evals 27,741) both pass all asserts, chunked identical to unchunked in both modes. Not added to the curated smoke_tests.txt (matches BlackJAXNUTS.py / Nautilus_jax.py precedent) — it runs in the full run_all_scripts.sh sweep, and needs PyAutoFit#1492 merged first. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018dV9h5h76hZ6trGZKWJFHe
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.
Companion to PyAutoFit#1492 (the af.NSS re-mainlining on mainline blackjax ≥1.6) — restores integration coverage for the search in the
scripts/searches/suite, where every other first-class search already has a script and NSS was the gap.What it covers
scripts/searches/NSS.py, mirroring theBlackJAXNUTS.pyconvention (same 1D Gaussian cell,use_jax=True, pytree registration,NullPathsin-memory run,ENV: real_search jaxin-file tag):chunk_size=7 < num_delete=25— the_chunked_nss.pykernel recomposed for mainline in #1492) asserting bit-parity of the evidence with the unchunked run — the strongest integration check the chunked path can get.num_mcmc_steps=6follows the upstream≥ max(5, 2·d)inner-steps guidance at d=3 (under-stepping biases logZ upward per the blackjax 1.6 docstring).Validation (CPU, against the PyAutoFit#1492 branch)
PYAUTO_TEST_MODE=1(the sweep's mode — loosens NSS's termination): recovered (50.150, 25.227, 9.858); logZ −72.164; 27,741 evals; chunked ≡ unchunked. All asserts pass.Merge gate
af.NSSdoes not exist on PyAutoFit main until then, so the fullrun_all_scripts.shsweep would log this script as failing. Not added to the curatedsmoke_tests.txt(matches theBlackJAXNUTS.py/Nautilus_jax.pyprecedent of keeping the CI gate list minimal), so the PR-gating smoke run is unaffected either way.🤖 Generated with Claude Code
https://claude.ai/code/session_018dV9h5h76hZ6trGZKWJFHe
Generated by Claude Code