Skip to content
Open
Show file tree
Hide file tree
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
252 changes: 0 additions & 252 deletions bayeux/_src/mcmc/flowmc.py

This file was deleted.

12 changes: 0 additions & 12 deletions bayeux/mcmc/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,18 +35,6 @@
"NUTSblackjax", "HMC_Pathfinder_blackjax",
"NUTS_Pathfinder_blackjax"])

if importlib.util.find_spec("flowMC") is not None:
from bayeux._src.mcmc.flowmc import MaskedCouplingRQSplineHMC as MaskedCouplingRQSplineHMCflowmc
from bayeux._src.mcmc.flowmc import MaskedCouplingRQSplineMALA as MaskedCouplingRQSplineMALAflowmc
from bayeux._src.mcmc.flowmc import RealNVPHMC as RealNVPHMCflowmc
from bayeux._src.mcmc.flowmc import RealNVPMALA as RealNVPMALAflowmc

__all__.extend([
"MaskedCouplingRQSplineHMCflowmc",
"MaskedCouplingRQSplineMALAflowmc",
"RealNVPHMCflowmc",
"RealNVPMALAflowmc"])

if importlib.util.find_spec("numpyro") is not None:
from bayeux._src.mcmc.numpyro import HMC as HMCnumpyro
from bayeux._src.mcmc.numpyro import NUTS as NUTSnumpyro
Expand Down
19 changes: 0 additions & 19 deletions bayeux/tests/mcmc_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,25 +95,6 @@ def test_return_pytree_tfp_nuts():
assert pytree["x"]["y"].shape == (10, 4)


@pytest.mark.skipif(importlib.util.find_spec("flowMC") is None,
reason="Test requires flowMC which is not installed")
def test_return_pytree_flowmc():
model = bx.Model(log_density=lambda pt: -jnp.sum(pt["x"]["y"]**2),
test_point={"x": {"y": jnp.array([1., 1.])}})
seed = jax.random.PRNGKey(0)
pytree = model.mcmc.flowmc_realnvp_mala(
seed=seed,
return_pytree=True,
n_chains=4,
n_local_steps=1,
n_global_steps=1,
n_loop_training=1,
n_loop_production=5,
)
# 10 draws = (1 local + 1 global) * 5 loops
assert pytree["x"]["y"].shape == (4, 10, 2)


@pytest.mark.skipif(importlib.util.find_spec("nutpie") is None,
reason="Test requires nutpie which is not installed")
def test_return_pytree_nutpie():
Expand Down
12 changes: 0 additions & 12 deletions docs/inspecting.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,10 +70,6 @@ normal_model.methods
'blackjax_nuts',
'blackjax_hmc_pathfinder',
'blackjax_nuts_pathfinder',
'flowmc_rqspline_hmc',
'flowmc_rqspline_mala',
'flowmc_realnvp_hmc',
'flowmc_realnvp_mala',
'numpyro_hmc',
'numpyro_nuts'],
'optimize': ['jaxopt_bfgs',
Expand Down Expand Up @@ -124,10 +120,6 @@ mcmc
.blackjax_nuts
.blackjax_hmc_pathfinder
.blackjax_nuts_pathfinder
.flowmc_rqspline_hmc
.flowmc_rqspline_mala
.flowmc_realnvp_hmc
.flowmc_realnvp_mala
.numpyro_hmc
.numpyro_nuts
optimize
Expand Down Expand Up @@ -216,10 +208,6 @@ blackjax_meads_hmc
blackjax_nuts
blackjax_hmc_pathfinder
blackjax_nuts_pathfinder
flowmc_rqspline_hmc
flowmc_rqspline_mala
flowmc_realnvp_hmc
flowmc_realnvp_mala
numpyro_hmc
numpyro_nuts
```
1 change: 0 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ dependencies = [
"optax",
"optimistix",
"blackjax",
"flowmc>=0.3.0",
"numpyro",
"jaxopt",
"pymc",
Expand Down