Skip to content

docs: skip BlackJAXNUTS example when blackjax absent (Python matrix)#89

Merged
Jammy2211 merged 1 commit into
mainfrom
feature/workspace-smoke-optional-guards
Jul 11, 2026
Merged

docs: skip BlackJAXNUTS example when blackjax absent (Python matrix)#89
Jammy2211 merged 1 commit into
mainfrom
feature/workspace-smoke-optional-guards

Conversation

@Jammy2211

Copy link
Copy Markdown
Collaborator

Summary

The PyAutoBuild Python Version Matrix installs the NumPy-only stack, so scripts/searches/mcmc.py failed with ModuleNotFoundError: No module named 'blackjax' — the BlackJAXNUTS section needs the optional blackjax package (ships via autofit[optional]).

Adds an importlib.util.find_spec("blackjax") guard before the NUTS section that skips it gracefully (prints a message and sys.exit(0)) when blackjax is absent. The Emcee and Zeus sections above run normally; under the full release stack the whole example runs unchanged.

Verification

Ran against a clean 2026.7.9.1 venv (with emcee/zeus, without blackjax): Emcee and Zeus run, then the NUTS section prints the skip message and exits 0.

Scripts Changed

  • scripts/searches/mcmc.py — backend-absent guard on the NUTS section only. Notebook regenerates from the script on the release build.

🤖 Generated with Claude Code

The Python Version Matrix installs the NumPy-only stack, so scripts/searches/mcmc.py
failed with ModuleNotFoundError on the optional blackjax backend. Add a
find_spec guard that skips the blackjax section gracefully (print + exit 0)
when it is not installed; the example runs in full under the release stack.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@Jammy2211 Jammy2211 added the pending-release PR queued for the next release build label Jul 11, 2026
@Jammy2211
Jammy2211 merged commit a832786 into main Jul 11, 2026
6 of 8 checks passed
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