-
-
Notifications
You must be signed in to change notification settings - Fork 126
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add support for numpyro and blackjax PyMC samplers (#526)
* Add support for numpyro and blackjax PyMC samplers * Update bambi/models.py Co-authored-by: Osvaldo A Martin <aloctavodia@gmail.com> * Lazily import jax sampling. Refactor sampler_backend to instead be part of the method argument * Fix for chains bug in numpyro and blackjax backends * Minor error message fix * Rename mcmc-numpyro/blackjax to nuts_numpyro/blackjax * Remove incorrect statement about chain_method as the default is now "parallel" * Extend tests to also cover numpyro/blackjax samplers * Run black and pylint * Re-run black with latest version * Add pylint error ignores for lazy imports * Re-add math import on init. Lazy importing looks to have fixed circular imports and this is needed for tests to work * Add optional dependencies for Jax samplers & modify test setup accordingly * Update pymc.py * Run black * Add new numpyro/blackjax only tests and revert old tests Co-authored-by: mark <mark@longshotsystems.co.uk> Co-authored-by: Osvaldo A Martin <aloctavodia@gmail.com>
- Loading branch information
1 parent
4b89c4f
commit 91903c8
Showing
6 changed files
with
117 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
jax>=0.3.1 | ||
jaxlib>=0.3.1 | ||
numpyro>=0.9.0 | ||
blackjax>=0.7.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters