Skip to content

fix: Emcee and Zeus default to one core until their pooled path is fixed - #1803

Merged
Jammy2211 merged 1 commit into
mainfrom
feature/emcee-zeus-default-one-core
Nov 26, 2026
Merged

Jammy2211 merged 1 commit into
mainfrom
feature/emcee-zeus-default-one-core

Conversation

@Jammy2211

Copy link
Copy Markdown
Collaborator

Summary

R6 (#1800) made number_of_cores="auto" the default for every search, so a default af.Emcee() or af.Zeus() fit now runs through a multiprocessing pool, and that pooled path is broken:

  • Emcee: with a fresh output folder and 2 cores, it returns log_likelihood = inf, then hangs at interpreter exit because its SneakyPool workers are never sent a stop signal. The released 2026.11.25.1 behaves the same; 1 core is correct on both.
  • Zeus: pooled runs get wrong log probabilities. On main, 9 Zeus conformance tests fail intermittently on 3.13 (Number of contractions exceeded maximum limit!).

This PR sets both searches back to a default of number_of_cores=1, as R6 already does for GridSearch, and explains why in their docstrings. "auto" and explicit counts still work as an opt-in. Fixing the pooled path itself is tracked in PyAutoMind draft/bug/autofit/pooled_emcee_zeus_wrong_likelihoods.md.

Closes #1802.

API Changes

Default value only: Emcee(number_of_cores=...) and Zeus(number_of_cores=...) now default to 1 instead of "auto", the same as before R6. No signatures change.

Test Plan

  • test_autofit/non_linear/search/mcmc + test_conformance_backend.py: 227 passed, 1 skipped.
  • Full suite on Python 3.13: 4399 passed, 2 skipped, 1 xfailed, 0 failed.
  • autofit_workspace/scripts/plot/emcee_plotter.py (the release-integrate timeout), with a fresh output folder each time: on library main it hangs until the 150s cap (exit 124); on this branch it completes in 15s.
  • I couldn't reproduce the intermittent 3.13 Zeus conformance failure locally: those tests pass on main here too (10/10). This PR removes the pooled path those tests took under "auto" (main resolves to the detected cores), so CI is the check.

Corrective PR (Heart RED)

  • Authorization: live human, 2026-11-26, in the session that opened this PR. Asked "Authorize both corrective PRs for the two quoted RED reasons?", answered "Authorize both".
  • RED reason this diff clears (verbatim): ✗ PyAutoFit: CI failure.
  • How the reason maps to the fix: the 9 failing Zeus conformance tests on main use the default core count, which runs a pool → fix: Emcee and Zeus default to one core until their pooled path is fixed #1802 → this diff, which removes the pool from the default path. It also removes the emcee_plotter.py timeout in ✗ release validation FAILED (stage integrate).
  • Other RED reasons that remain: the integrate stage stays failed until a new release-integrate run passes, which needs a separate human go. The autogalaxy_test routing failures are PyAutoLabs/autogalaxy_workspace_test#141. This PR does not clear Heart by itself, and merging is a separate human /prm.

🤖 Generated with Claude Code

R6 (#1800) made number_of_cores="auto" the default, so default Emcee and
Zeus fits ran through their multiprocessing pool, which is broken (Emcee
returns log_likelihood=inf and leaves SneakyPool workers running at exit;
pooled Zeus gets wrong log probabilities). The default goes back to 1 for
these two searches, as for GridSearch; "auto" stays an explicit opt-in.

Closes #1802

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@Jammy2211
Jammy2211 merged commit 551f617 into main Nov 26, 2026
6 checks passed
@Jammy2211
Jammy2211 deleted the feature/emcee-zeus-default-one-core branch November 26, 2026 13:41
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.

fix: Emcee and Zeus default to one core until their pooled path is fixed

1 participant