diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ed4c5eeac..ffcd94b88 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -9,7 +9,7 @@ on: branches: [ master ] env: - PYTEST_ADDOPTS: "--cov=numpyro" + PYTEST_ADDOPTS: "--cov=numpyro --cov-append" jobs: lint: diff --git a/.gitignore b/.gitignore index 97019aa24..62b04d0ba 100644 --- a/.gitignore +++ b/.gitignore @@ -3,6 +3,7 @@ __pycache__/ .ipynb_checkpoints/ build .DS_Store +.coverage # built / compiled *.pyc diff --git a/examples/annotation.py b/examples/annotation.py index 76836063e..8dfd8cd3d 100644 --- a/examples/annotation.py +++ b/examples/annotation.py @@ -320,7 +320,7 @@ def main(args): if __name__ == "__main__": - assert numpyro.__version__.startswith("0.16.0") + assert numpyro.__version__.startswith("0.16.1") parser = argparse.ArgumentParser(description="Bayesian Models of Annotation") parser.add_argument("-n", "--num-samples", nargs="?", default=1000, type=int) parser.add_argument("--num-warmup", nargs="?", default=1000, type=int) diff --git a/examples/ar2.py b/examples/ar2.py index 103bc5a62..9d5bb6022 100644 --- a/examples/ar2.py +++ b/examples/ar2.py @@ -138,7 +138,7 @@ def main(args): if __name__ == "__main__": - assert numpyro.__version__.startswith("0.16.0") + assert numpyro.__version__.startswith("0.16.1") parser = argparse.ArgumentParser(description="AR2 example") parser.add_argument("--num-data", nargs="?", default=142, type=int) parser.add_argument("-n", "--num-samples", nargs="?", default=1000, type=int) diff --git a/examples/baseball.py b/examples/baseball.py index 6c6615f6e..dc73eb588 100644 --- a/examples/baseball.py +++ b/examples/baseball.py @@ -210,7 +210,7 @@ def main(args): if __name__ == "__main__": - assert numpyro.__version__.startswith("0.16.0") + assert numpyro.__version__.startswith("0.16.1") parser = argparse.ArgumentParser(description="Baseball batting average using MCMC") parser.add_argument("-n", "--num-samples", nargs="?", default=3000, type=int) parser.add_argument("--num-warmup", nargs="?", default=1500, type=int) diff --git a/examples/bnn.py b/examples/bnn.py index a290683f3..5ce4eb977 100644 --- a/examples/bnn.py +++ b/examples/bnn.py @@ -160,7 +160,7 @@ def main(args): if __name__ == "__main__": - assert numpyro.__version__.startswith("0.16.0") + assert numpyro.__version__.startswith("0.16.1") parser = argparse.ArgumentParser(description="Bayesian neural network example") parser.add_argument("-n", "--num-samples", nargs="?", default=2000, type=int) parser.add_argument("--num-warmup", nargs="?", default=1000, type=int) diff --git a/examples/covtype.py b/examples/covtype.py index d7a488e90..36607d40a 100644 --- a/examples/covtype.py +++ b/examples/covtype.py @@ -206,7 +206,7 @@ def main(args): if __name__ == "__main__": - assert numpyro.__version__.startswith("0.16.0") + assert numpyro.__version__.startswith("0.16.1") parser = argparse.ArgumentParser(description="parse args") parser.add_argument( "-n", "--num-samples", default=1000, type=int, help="number of samples" diff --git a/examples/funnel.py b/examples/funnel.py index 707b44614..71f3920fa 100644 --- a/examples/funnel.py +++ b/examples/funnel.py @@ -139,7 +139,7 @@ def main(args): if __name__ == "__main__": - assert numpyro.__version__.startswith("0.16.0") + assert numpyro.__version__.startswith("0.16.1") parser = argparse.ArgumentParser( description="Non-centered reparameterization example" ) diff --git a/examples/gaussian_shells.py b/examples/gaussian_shells.py index 30a4dcc71..6e49a9a8a 100644 --- a/examples/gaussian_shells.py +++ b/examples/gaussian_shells.py @@ -120,7 +120,7 @@ def main(args): if __name__ == "__main__": - assert numpyro.__version__.startswith("0.16.0") + assert numpyro.__version__.startswith("0.16.1") parser = argparse.ArgumentParser(description="Nested sampler for Gaussian shells") parser.add_argument("-n", "--num-samples", nargs="?", default=10000, type=int) diff --git a/examples/gp.py b/examples/gp.py index 3f26ad2ae..ad39ade57 100644 --- a/examples/gp.py +++ b/examples/gp.py @@ -180,7 +180,7 @@ def main(args): if __name__ == "__main__": - assert numpyro.__version__.startswith("0.16.0") + assert numpyro.__version__.startswith("0.16.1") parser = argparse.ArgumentParser(description="Gaussian Process example") parser.add_argument("-n", "--num-samples", nargs="?", default=1000, type=int) parser.add_argument("--num-warmup", nargs="?", default=1000, type=int) diff --git a/examples/hmm.py b/examples/hmm.py index f60413271..f3adc1204 100644 --- a/examples/hmm.py +++ b/examples/hmm.py @@ -263,7 +263,7 @@ def main(args): if __name__ == "__main__": - assert numpyro.__version__.startswith("0.16.0") + assert numpyro.__version__.startswith("0.16.1") parser = argparse.ArgumentParser(description="Semi-supervised Hidden Markov Model") parser.add_argument("--num-categories", default=3, type=int) parser.add_argument("--num-words", default=10, type=int) diff --git a/examples/holt_winters.py b/examples/holt_winters.py index 8ab1a3aa7..653070823 100644 --- a/examples/holt_winters.py +++ b/examples/holt_winters.py @@ -180,7 +180,7 @@ def main(args): if __name__ == "__main__": - assert numpyro.__version__.startswith("0.16.0") + assert numpyro.__version__.startswith("0.16.1") parser = argparse.ArgumentParser(description="Holt-Winters") parser.add_argument("--T", nargs="?", default=6, type=int) parser.add_argument("--future", nargs="?", default=1, type=int) diff --git a/examples/horseshoe_regression.py b/examples/horseshoe_regression.py index 608a6b5ca..b6562d1e6 100644 --- a/examples/horseshoe_regression.py +++ b/examples/horseshoe_regression.py @@ -162,7 +162,7 @@ def main(args): if __name__ == "__main__": - assert numpyro.__version__.startswith("0.16.0") + assert numpyro.__version__.startswith("0.16.1") parser = argparse.ArgumentParser(description="Horseshoe regression example") parser.add_argument("-n", "--num-samples", nargs="?", default=2000, type=int) parser.add_argument("--num-warmup", nargs="?", default=1000, type=int) diff --git a/examples/minipyro.py b/examples/minipyro.py index 613aee406..996cbd7f5 100644 --- a/examples/minipyro.py +++ b/examples/minipyro.py @@ -58,7 +58,7 @@ def body_fn(i, val): if __name__ == "__main__": - assert numpyro.__version__.startswith("0.16.0") + assert numpyro.__version__.startswith("0.16.1") parser = argparse.ArgumentParser(description="Mini Pyro demo") parser.add_argument("-f", "--full-pyro", action="store_true", default=False) parser.add_argument("-n", "--num-steps", default=1001, type=int) diff --git a/examples/mortality.py b/examples/mortality.py index 3bb460b31..a420c441c 100644 --- a/examples/mortality.py +++ b/examples/mortality.py @@ -220,7 +220,7 @@ def main(args): if __name__ == "__main__": - assert numpyro.__version__.startswith("0.16.0") + assert numpyro.__version__.startswith("0.16.1") parser = argparse.ArgumentParser(description="Mortality regression model") parser.add_argument("-n", "--num-samples", nargs="?", default=500, type=int) diff --git a/examples/neutra.py b/examples/neutra.py index 6a9557b4a..6b0ada526 100644 --- a/examples/neutra.py +++ b/examples/neutra.py @@ -197,7 +197,7 @@ def main(args): if __name__ == "__main__": - assert numpyro.__version__.startswith("0.16.0") + assert numpyro.__version__.startswith("0.16.1") parser = argparse.ArgumentParser(description="NeuTra HMC") parser.add_argument("-n", "--num-samples", nargs="?", default=4000, type=int) parser.add_argument("--num-warmup", nargs="?", default=1000, type=int) diff --git a/examples/ode.py b/examples/ode.py index 6655c32ed..e50857b4e 100644 --- a/examples/ode.py +++ b/examples/ode.py @@ -117,7 +117,7 @@ def main(args): if __name__ == "__main__": - assert numpyro.__version__.startswith("0.16.0") + assert numpyro.__version__.startswith("0.16.1") parser = argparse.ArgumentParser(description="Predator-Prey Model") parser.add_argument("-n", "--num-samples", nargs="?", default=1000, type=int) parser.add_argument("--num-warmup", nargs="?", default=1000, type=int) diff --git a/examples/prodlda.py b/examples/prodlda.py index aaec56197..e55bb2308 100644 --- a/examples/prodlda.py +++ b/examples/prodlda.py @@ -315,7 +315,7 @@ def main(args): if __name__ == "__main__": - assert numpyro.__version__.startswith("0.16.0") + assert numpyro.__version__.startswith("0.16.1") parser = argparse.ArgumentParser( description="Probabilistic topic modelling with Flax and Haiku" ) diff --git a/examples/proportion_test.py b/examples/proportion_test.py index 494f0458b..f0f4dbe6b 100644 --- a/examples/proportion_test.py +++ b/examples/proportion_test.py @@ -158,7 +158,7 @@ def main(args): if __name__ == "__main__": - assert numpyro.__version__.startswith("0.16.0") + assert numpyro.__version__.startswith("0.16.1") parser = argparse.ArgumentParser(description="Testing whether ") parser.add_argument("-n", "--num-samples", nargs="?", default=500, type=int) parser.add_argument("--num-warmup", nargs="?", default=1500, type=int) diff --git a/examples/sparse_regression.py b/examples/sparse_regression.py index 9cfc40eae..a1d6f6354 100644 --- a/examples/sparse_regression.py +++ b/examples/sparse_regression.py @@ -384,7 +384,7 @@ def main(args): if __name__ == "__main__": - assert numpyro.__version__.startswith("0.16.0") + assert numpyro.__version__.startswith("0.16.1") parser = argparse.ArgumentParser(description="Gaussian Process example") parser.add_argument("-n", "--num-samples", nargs="?", default=1000, type=int) parser.add_argument("--num-warmup", nargs="?", default=500, type=int) diff --git a/examples/stochastic_volatility.py b/examples/stochastic_volatility.py index 0338e9fea..a91c9c3d5 100644 --- a/examples/stochastic_volatility.py +++ b/examples/stochastic_volatility.py @@ -122,7 +122,7 @@ def main(args): if __name__ == "__main__": - assert numpyro.__version__.startswith("0.16.0") + assert numpyro.__version__.startswith("0.16.1") parser = argparse.ArgumentParser(description="Stochastic Volatility Model") parser.add_argument("-n", "--num-samples", nargs="?", default=600, type=int) parser.add_argument("--num-warmup", nargs="?", default=600, type=int) diff --git a/examples/thompson_sampling.py b/examples/thompson_sampling.py index 1d3d8b646..3d7bf552a 100644 --- a/examples/thompson_sampling.py +++ b/examples/thompson_sampling.py @@ -292,7 +292,7 @@ def main(args): if __name__ == "__main__": - assert numpyro.__version__.startswith("0.16.0") + assert numpyro.__version__.startswith("0.16.1") parser = argparse.ArgumentParser(description="Thompson sampling example") parser.add_argument( "--num-random", nargs="?", default=2, type=int, help="number of random draws" diff --git a/examples/toy_mixture_model_discrete_enumeration.py b/examples/toy_mixture_model_discrete_enumeration.py index 7f30662b7..46223d2e1 100644 --- a/examples/toy_mixture_model_discrete_enumeration.py +++ b/examples/toy_mixture_model_discrete_enumeration.py @@ -126,7 +126,7 @@ def get_true_pred_CPDs(CPD, posterior_param): if __name__ == "__main__": - assert numpyro.__version__.startswith("0.16.0") + assert numpyro.__version__.startswith("0.16.1") parser = argparse.ArgumentParser(description="Toy mixture model") parser.add_argument("-n", "--num-steps", default=4000, type=int) parser.add_argument("-o", "--num-obs", default=10000, type=int) diff --git a/examples/ucbadmit.py b/examples/ucbadmit.py index 6f5af22ed..50a712461 100644 --- a/examples/ucbadmit.py +++ b/examples/ucbadmit.py @@ -151,7 +151,7 @@ def main(args): if __name__ == "__main__": - assert numpyro.__version__.startswith("0.16.0") + assert numpyro.__version__.startswith("0.16.1") parser = argparse.ArgumentParser( description="UCBadmit gender discrimination using HMC" ) diff --git a/examples/vae.py b/examples/vae.py index 2f762704b..8bbedabbb 100644 --- a/examples/vae.py +++ b/examples/vae.py @@ -160,7 +160,7 @@ def reconstruct_img(epoch, rng_key): if __name__ == "__main__": - assert numpyro.__version__.startswith("0.16.0") + assert numpyro.__version__.startswith("0.16.1") parser = argparse.ArgumentParser(description="parse args") parser.add_argument( "-n", "--num-epochs", default=15, type=int, help="number of training epochs" diff --git a/notebooks/source/bad_posterior_geometry.ipynb b/notebooks/source/bad_posterior_geometry.ipynb index fd468e2f9..af667ae9f 100644 --- a/notebooks/source/bad_posterior_geometry.ipynb +++ b/notebooks/source/bad_posterior_geometry.ipynb @@ -49,7 +49,7 @@ "import numpyro.distributions as dist\n", "from numpyro.infer import MCMC, NUTS\n", "\n", - "assert numpyro.__version__.startswith(\"0.16.0\")\n", + "assert numpyro.__version__.startswith(\"0.16.1\")\n", "\n", "# NB: replace cpu by gpu to run this notebook on gpu\n", "numpyro.set_platform(\"cpu\")" diff --git a/notebooks/source/bayesian_hierarchical_linear_regression.ipynb b/notebooks/source/bayesian_hierarchical_linear_regression.ipynb index 3f0d7cf4b..262ff060a 100644 --- a/notebooks/source/bayesian_hierarchical_linear_regression.ipynb +++ b/notebooks/source/bayesian_hierarchical_linear_regression.ipynb @@ -246,7 +246,7 @@ "import numpyro.distributions as dist\n", "from numpyro.infer import MCMC, NUTS, Predictive\n", "\n", - "assert numpyro.__version__.startswith(\"0.16.0\")" + "assert numpyro.__version__.startswith(\"0.16.1\")" ] }, { diff --git a/notebooks/source/bayesian_hierarchical_stacking.ipynb b/notebooks/source/bayesian_hierarchical_stacking.ipynb index 5287700b8..a9bee14f8 100644 --- a/notebooks/source/bayesian_hierarchical_stacking.ipynb +++ b/notebooks/source/bayesian_hierarchical_stacking.ipynb @@ -97,7 +97,7 @@ " set_matplotlib_formats(\"svg\")\n", "\n", "numpyro.set_host_device_count(4)\n", - "assert numpyro.__version__.startswith(\"0.16.0\")" + "assert numpyro.__version__.startswith(\"0.16.1\")" ] }, { diff --git a/notebooks/source/bayesian_imputation.ipynb b/notebooks/source/bayesian_imputation.ipynb index e766a1037..cdce24336 100644 --- a/notebooks/source/bayesian_imputation.ipynb +++ b/notebooks/source/bayesian_imputation.ipynb @@ -52,7 +52,7 @@ "if \"NUMPYRO_SPHINXBUILD\" in os.environ:\n", " set_matplotlib_formats(\"svg\")\n", "\n", - "assert numpyro.__version__.startswith(\"0.16.0\")" + "assert numpyro.__version__.startswith(\"0.16.1\")" ] }, { diff --git a/notebooks/source/bayesian_regression.ipynb b/notebooks/source/bayesian_regression.ipynb index 6e9b9e553..07e4bb552 100644 --- a/notebooks/source/bayesian_regression.ipynb +++ b/notebooks/source/bayesian_regression.ipynb @@ -91,7 +91,7 @@ "if \"NUMPYRO_SPHINXBUILD\" in os.environ:\n", " set_matplotlib_formats(\"svg\")\n", "\n", - "assert numpyro.__version__.startswith(\"0.16.0\")" + "assert numpyro.__version__.startswith(\"0.16.1\")" ] }, { diff --git a/notebooks/source/censoring.ipynb b/notebooks/source/censoring.ipynb index 41f7c9430..0f2827512 100644 --- a/notebooks/source/censoring.ipynb +++ b/notebooks/source/censoring.ipynb @@ -60,7 +60,7 @@ "\n", "rng_key = random.PRNGKey(seed=0)\n", "\n", - "assert numpyro.__version__.startswith(\"0.16.0\")\n", + "assert numpyro.__version__.startswith(\"0.16.1\")\n", "\n", "%load_ext autoreload\n", "%autoreload 2\n", diff --git a/notebooks/source/gmm.ipynb b/notebooks/source/gmm.ipynb index 6a1ee5c12..9ca4ec8cd 100644 --- a/notebooks/source/gmm.ipynb +++ b/notebooks/source/gmm.ipynb @@ -54,7 +54,7 @@ "%matplotlib inline\n", "\n", "smoke_test = \"CI\" in os.environ\n", - "assert numpyro.__version__.startswith(\"0.16.0\")" + "assert numpyro.__version__.startswith(\"0.16.1\")" ] }, { diff --git a/notebooks/source/hsgp_example.ipynb b/notebooks/source/hsgp_example.ipynb index 557a5354a..2f5b07c4e 100644 --- a/notebooks/source/hsgp_example.ipynb +++ b/notebooks/source/hsgp_example.ipynb @@ -62,7 +62,7 @@ "\n", "rng_key = random.PRNGKey(seed=42)\n", "\n", - "assert numpyro.__version__.startswith(\"0.16.0\")\n", + "assert numpyro.__version__.startswith(\"0.16.1\")\n", "\n", "%load_ext autoreload\n", "%autoreload 2\n", diff --git a/notebooks/source/logistic_regression.ipynb b/notebooks/source/logistic_regression.ipynb index 137e471af..8127586e6 100644 --- a/notebooks/source/logistic_regression.ipynb +++ b/notebooks/source/logistic_regression.ipynb @@ -41,7 +41,7 @@ "from numpyro.examples.datasets import COVTYPE, load_dataset\n", "from numpyro.infer import HMC, MCMC, NUTS\n", "\n", - "assert numpyro.__version__.startswith(\"0.16.0\")\n", + "assert numpyro.__version__.startswith(\"0.16.1\")\n", "\n", "# NB: replace gpu by cpu to run this notebook in cpu\n", "numpyro.set_platform(\"gpu\")" diff --git a/notebooks/source/model_rendering.ipynb b/notebooks/source/model_rendering.ipynb index 454b432c1..deaa88f3e 100644 --- a/notebooks/source/model_rendering.ipynb +++ b/notebooks/source/model_rendering.ipynb @@ -38,7 +38,7 @@ "import numpyro.distributions as dist\n", "import numpyro.distributions.constraints as constraints\n", "\n", - "assert numpyro.__version__.startswith(\"0.16.0\")" + "assert numpyro.__version__.startswith(\"0.16.1\")" ] }, { diff --git a/notebooks/source/ordinal_regression.ipynb b/notebooks/source/ordinal_regression.ipynb index 6d48e2db8..e7fbe0c05 100644 --- a/notebooks/source/ordinal_regression.ipynb +++ b/notebooks/source/ordinal_regression.ipynb @@ -54,7 +54,7 @@ "from numpyro.infer import MCMC, NUTS\n", "from numpyro.infer.reparam import TransformReparam\n", "\n", - "assert numpyro.__version__.startswith(\"0.16.0\")" + "assert numpyro.__version__.startswith(\"0.16.1\")" ] }, { diff --git a/notebooks/source/other_samplers.ipynb b/notebooks/source/other_samplers.ipynb index a3e7c5a12..18518c72a 100644 --- a/notebooks/source/other_samplers.ipynb +++ b/notebooks/source/other_samplers.ipynb @@ -67,7 +67,7 @@ "\n", "rng_key = random.PRNGKey(seed=42)\n", "\n", - "assert numpyro.__version__.startswith(\"0.16.0\")\n", + "assert numpyro.__version__.startswith(\"0.16.1\")\n", "\n", "%load_ext autoreload\n", "%autoreload 2\n", diff --git a/notebooks/source/time_series_forecasting.ipynb b/notebooks/source/time_series_forecasting.ipynb index 1b12b09da..cacf8112f 100644 --- a/notebooks/source/time_series_forecasting.ipynb +++ b/notebooks/source/time_series_forecasting.ipynb @@ -48,7 +48,7 @@ " set_matplotlib_formats(\"svg\")\n", "\n", "numpyro.set_host_device_count(4)\n", - "assert numpyro.__version__.startswith(\"0.16.0\")" + "assert numpyro.__version__.startswith(\"0.16.1\")" ] }, { diff --git a/numpyro/version.py b/numpyro/version.py index 0799da2cd..8ff8ea390 100644 --- a/numpyro/version.py +++ b/numpyro/version.py @@ -1,4 +1,4 @@ # Copyright Contributors to the Pyro project. # SPDX-License-Identifier: Apache-2.0 -__version__ = "0.16.0" +__version__ = "0.16.1"