Skip to content

feat: searches default to number_of_cores="auto" (R6) - #1800

Merged
Jammy2211 merged 1 commit into
mainfrom
feature/likelihood-lifecycle-r6-default-auto
Nov 26, 2026
Merged

Jammy2211 merged 1 commit into
mainfrom
feature/likelihood-lifecycle-r6-default-auto

Conversation

@Jammy2211

Copy link
Copy Markdown
Collaborator

Summary

Part of PyAutoLabs/PyAutoGalaxy#759 (likelihood-lifecycle ruling R6: flip the defaults after the 2026.11.25.1 opt-in release). Same branch feature/likelihood-lifecycle-r6-default-auto in PyAutoArray, PyAutoFit, PyAutoGalaxy, PyAutoLens and autolens_workspace_test. Merge order: Array → Fit → Galaxy → Lens → autolens_workspace_test.

  • Searches default to number_of_cores="auto" (Nautilus, Dynesty static/dynamic, Emcee, Zeus, NSS, BlackJAX NUTS/SMC, the abstract nest/MCMC bases, the search template and settings): resolved by resolve_number_of_cores at fit start — 1 for a JAX analysis or an expectation-propagation factor search, otherwise the detected cores, capped by resources_per_eval() when the analysis declares it.
  • GridSearch stays at number_of_cores=1 (human ruling): "auto" hung the test suite through the grid search's own Process job pool; its docstring says so.
  • Fixes needed by the multi-core default: Zeus attaches its pool only while sampling (the pool was being pickled with the search when number_of_cores > 1); the interpolator's covariance fit pins its DynestyStatic to one core.

API Changes

Default number_of_cores changes from 1 to "auto" for every search except GridSearch. Explicit ints are honoured as before.
See full details below.

Test Plan

  • Full suites with JAX (serial): PyAutoArray 2614, PyAutoFit 4391, PyAutoGalaxy 1679, PyAutoLens 1177 passed
  • No-JAX leg reproduced exactly as CI (venv with the [optional] extras, jax family uninstalled): PyAutoArray 2149, PyAutoFit 4064, PyAutoGalaxy 1595, PyAutoLens 1112 passed, 0 failed
  • pyauto-heart smoke --affected-by PyAutoFit against the task worktree: 7/8 workspaces; the one failing script (autolens_workspace_test jax_assertions/fit_interferometer_sparse_operator.py) encodes the old lazy-off default and is fixed by the companion autolens_workspace_test PR (passes against this branch)
  • PyAutoFit suite time with the new default: 325.7 s (main: 337 s)
  • Heart dev-ship readiness: GREEN (after a fresh tick). Shown, non-blocking: canonical PyAutoFit/PyAutoGalaxy/PyAutoLens checkouts 2 commits behind origin (release Colab-URL bumps; the task branches are rebased on them); manifest drift (1 mismatch).
Full API Changes (for automation & release notes)

Changed

  • number_of_cores: Union[int, str] = "auto" on NonLinearSearch, AbstractNest, AbstractMCMC, Nautilus, DynestyStatic, DynestyDynamic, Emcee, Zeus, NSS, BlackJAX NUTS/SMC and af.Settings.
  • GridSearch(number_of_cores=1) unchanged.

Migration

  • To keep one process: pass number_of_cores=1.

Generated by the PyAutoLabs agent workflow.

🤖 Generated with Claude Code

Part of PyAutoLabs/PyAutoGalaxy#759.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@Jammy2211 Jammy2211 added the pending-release PR queued for the next release build label Nov 26, 2026
@Jammy2211
Jammy2211 merged commit 67164d2 into main Nov 26, 2026
6 checks passed
@Jammy2211
Jammy2211 deleted the feature/likelihood-lifecycle-r6-default-auto branch November 26, 2026 09:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pending-release PR queued for the next release build

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant