Skip to content

fix: search kwarg typos in searches/mcmc.py and nest.py - #170

Merged
Jammy2211 merged 2 commits into
mainfrom
feature/search-ext-kwarg-typos
Oct 15, 2026
Merged

Jammy2211 merged 2 commits into
mainfrom
feature/search-ext-kwarg-typos

Conversation

@Jammy2211

@Jammy2211 Jammy2211 commented Oct 15, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Two search examples passed constructor kwargs that were always silently swallowed by **kwargs, so the settings shown to users never applied. Since A0b (PyAutoLabs/PyAutoFit#1672, released) each logs an unknown-keyword WARNING. Argument names checked with inspect.signature against released autofit 2026.10.12.1.

  • auto_correlations_settings= → auto_correlation_settings= (Emcee, Zeus).
  • nlive=50 → nlive_init=50 on af.DynestyDynamic (its constructor takes nlive_init, default 500). Behaviour note: outside test mode the nest.py DynestyDynamic example now really runs with 50 initial live points instead of the 500 default it silently used. (cookbooks/search.py only constructs that search and never fits it, so it has no runtime change.) The Emcee/Zeus values match the AutoCorrelationsSettings defaults, so their results don't change.

Notebooks regenerated with PyAutoHands/autohands/generate.py autofit; only the touched cells differ. (The generator also rewrote notebooks/searches/README.md with unrelated roster drift; I reverted that to stay in scope.)

Scripts Changed

  • scripts/searches/mcmc.py — auto_correlation_settings spelling (Emcee, Zeus)
  • scripts/searches/nest.py — nlive → nlive_init for DynestyDynamic
  • scripts/cookbooks/search.py — same two fixes (auto_correlation_settings for Emcee/Zeus; nlive_init for DynestyDynamic), found in review
  • notebooks/searches/mcmc.ipynb, notebooks/searches/nest.ipynb, notebooks/cookbooks/search.ipynb — regenerated

Upstream PR

PyAutoLabs/PyAutoFit#1695 — library-first: merge that one before this PR. The script fixes run fine on the released library either way.

Test Plan

Witness, PYAUTO_TEST_MODE=1 against released autofit 2026.10.12.1 (and again against the PyAutoFit main source):

  • searches/mcmc.py — before: Emcee received the unknown keyword argument 'auto_correlations_settings' (also Zeus); after: exit 0, unknown-keyword warnings: 0 (the only WARNINGs left are TEST MODE notices)
  • searches/nest.py — before: DynestyDynamic received the unknown keyword argument 'nlive'; after: exit 0, unknown-keyword warnings: 0
  • cookbooks/search.py — before: Emcee/Zeus 'auto_correlations_settings' and DynestyDynamic 'nlive' warnings (3); after: exit 0, unknown-keyword warnings: 0

Validation checklist (--auto run — plan was not pre-approved)

  • Effective level: safe (header: safe, Consequence: judge)
  • Plan: on the issue (fix: search kwarg typos silently ignored in workspace scripts and a graphical test PyAutoFit#1693), written at start, unmodified since
  • Gate: tests n/a (workspace) · smoke: all three touched scripts pass under test mode (mcmc/nest are in smoke_tests.txt) · review: one independent Opus round — in-scope diff correct; its findings (missed copies in cookbooks/search.py) were fixed in this PR under a scope extension from the coordinator; the second short Opus round on that diff: CLEAN · Heart RED under the development-only override below
  • Human: plan sound in hindsight?
  • Human: diff matches plan (no scope creep)?
  • Human: merge, amend, or reject — then log the outcome

Heart RED — development-only override (quoted from #1693)

Heart at the door: Heart: RED — Release RED; monitoring RED · 10/100 · 415 unresolved; [red] release validation FAILED (stage integrate); [red] PyAutoHands/workflows/Python Version Matrix: failure; [red] PyAutoHeart/workflows/Release Integrate: failure; [red] PyAutoMind/workflows/Lifecycle Drift: failure (cleared 2026-10-15 evening); [red] PyAutoArray/Tests: red; [red] autofit_workspace_test/Smoke Tests: red; [red] autogalaxy_workspace_test/Smoke Tests: red; [red] autolens_workspace_test/Smoke Tests: red; [red] Release validation: NOT release_ready; [red] Worktree drift; [red] autolens_inference: red; [red] autolens_profiling: red; [red] euclid_strong_lens_modeling_pipeline: red. Live human in session 6ffb59e9 answered AskUserQuestion "Yes, override for development (Recommended)" on 2026-10-15 for this launch. Permitted: commit, push, PR-open. Merge is a separate human act; this never reaches a release.

🤖 Generated with Claude Code

auto_correlations_settings -> auto_correlation_settings (Emcee, Zeus) and
nlive -> nlive_init (DynestyDynamic); both were silently ignored. Notebooks
regenerated.

Refs PyAutoLabs/PyAutoFit#1693

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
auto_correlations_settings -> auto_correlation_settings (Emcee, Zeus) and
nlive -> nlive_init (DynestyDynamic). Notebook regenerated.

Refs PyAutoLabs/PyAutoFit#1693

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@Jammy2211
Jammy2211 merged commit ade6c54 into main Oct 15, 2026
7 checks passed
@Jammy2211
Jammy2211 deleted the feature/search-ext-kwarg-typos branch October 15, 2026 17:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant