Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions scripts/searches/mcmc.py
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,22 @@

If you use `BlackJAXNUTS` as part of a published work, please cite the BlackJAX package following
the instructions on its GitHub page.

`BlackJAXNUTS` needs the `blackjax` package, which ships with the `[optional]`
extras (`pip install autofit[optional]`). When it is not installed (e.g. the
NumPy-only CI matrix), skip the remaining NUTS section — the `Emcee` and `Zeus`
examples above have already run.
"""
import importlib.util
import sys

if importlib.util.find_spec("blackjax") is None:
print(
"Skipping BlackJAXNUTS example: the `blackjax` package is not installed "
"(install with `pip install autofit[optional]`)."
)
sys.exit(0)

from autofit.jax.pytrees import enable_pytrees, register_model

enable_pytrees()
Expand Down
Loading