Repository navigation
fix: drop stale enable_pytrees/register_model advice from searches/mcmc.py - #185
Merged
Merged
Conversation
…mc.py Fitness.__init__ registers the model as a JAX pytree internally, so the BlackJAXNUTS example no longer tells users to call enable_pytrees() / register_model(model), which are not on the af namespace. The prose now names use_jax=True as the only requirement, matching searches/mle.py. Notebook regenerated with PyAutoHands generate.py. Closes #184 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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
scripts/searches/mcmc.pytold users to callenable_pytrees()/register_model(model)before runningBlackJAXNUTS. Neither function is onaf, andFitness.__init__(PyAutoFitautofit/non_linear/fitness.py:329-333) already calls both for any JAX analysis.scripts/searches/mle.pyalready says no registration is needed. TheBlackJAXNUTSprose now namesuse_jax=Trueas the only requirement, and the import and the two calls are gone. The notebook was regenerated with PyAutoHandsgenerate.py. The PyAutoFit half of the bug (the NUTS/SMC error strings) was already fixed on main.Closes #184
Scripts Changed
scripts/searches/mcmc.py: dropped the stale pytree-registration requirement from theBlackJAXNUTSprose, and removed theenable_pytrees/register_modelimport and callsnotebooks/searches/mcmc.ipynb: regenerated from the scriptTest Plan
.github/scripts/run_smoke.py): 8/8 scripts and 2/2 notebooks pass, includingsearches/mcmc.pyandsearches/mcmc.ipynbBlackJAXNUTSfit (100 warmup, 100 samples,use_jax=True, no manual registration) recovers centre 49.99, normalization 9.98, sigma 9.98 against true values of 50, 10, 10use_jax=False,BlackJAXNUTSraises aSearchExceptionthat namesuse_jax=TrueonlyValidation checklist (--auto run — plan was not pre-approved)
autofit/jax/__init__.py:9module docstring still mentionsenable_pytrees. That docstring covers callingjax.jitby hand and is the library end state the prompt's 2026-11-05 re-scope accepted, so there is no change here · Heart dev-ship--repos autofit_workspaceGREEN (shown, non-blocking: PyAutoLens dirty checkout, manifest drift ×2, PyAutoArray PR 10d old, release rehearsal stale — all within the shift's heart-ack)enable_pytreeshits inautofit_workspace/scripts/searches/; the library hits are internal only; the use_jax=False error names use_jax=True only)Generated by the PyAutoLabs agent workflow.
🤖 Generated with Claude Code