Skip to content

Commit

Permalink
Move to ruff
Browse files Browse the repository at this point in the history
  • Loading branch information
dirmeier committed Feb 29, 2024
1 parent 6787094 commit 50c556f
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 5 deletions.
4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,8 @@ dependencies = [
]

[tool.hatch.envs.test.scripts]
lint = 'ruff check surjectors'
test = 'pytest -v --cov=./surjectors --cov-report=xml surjectors'
lint = 'ruff check sbijax'
test = 'pytest -v --cov=./sbijax --cov-report=xml sbijax'

[tool.bandit]
skips = ["B101"]
Expand Down
15 changes: 15 additions & 0 deletions sbijax/_src/mcmc/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
from sbijax._src.mcmc.diagnostics import mcmc_diagnostics
from sbijax._src.mcmc.irmh import sample_with_imh
from sbijax._src.mcmc.mala import sample_with_mala
from sbijax._src.mcmc.nuts import sample_with_nuts
from sbijax._src.mcmc.rmh import sample_with_rmh
from sbijax._src.mcmc.slice import sample_with_slice

__all__ = [
"mcmc_diagnostics",
"sample_with_slice",
"sample_with_nuts",
"sample_with_mala",
"sample_with_rmh",
"sample_with_imh",
]
2 changes: 1 addition & 1 deletion sbijax/_src/mcmc/slice.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ def sample_with_slice(
r"""Sample from a distribution using the No-U-Turn sampler.
Args:
rng_seq: a hk.PRNGSequence
rng_key: a jax random key
lp: the logdensity you wish to sample from
prior: a function that returns a prior sample
n_chains: number of chains to sample
Expand Down
3 changes: 1 addition & 2 deletions sbijax/_src/nn/make_flows.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,7 @@
Permutation,
TransformedDistribution,
)
from surjectors._src.conditioners.mlp import make_mlp
from surjectors._src.conditioners.nn.made import MADE
from surjectors.nn import MADE, make_mlp
from surjectors.util import unstack


Expand Down

0 comments on commit 50c556f

Please sign in to comment.