Skip to content

Commit

Permalink
Bump to version 0.2 (#328)
Browse files Browse the repository at this point in the history
* Bump to version 0.2

* address comments

* add docs

* fix docs
  • Loading branch information
neerajprad authored and fehiepsi committed Sep 8, 2019
1 parent 1a5c16a commit 4e97cb4
Show file tree
Hide file tree
Showing 18 changed files with 35 additions and 5 deletions.
15 changes: 15 additions & 0 deletions docs/source/distributions.rst
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,14 @@ LogNormal
:show-inheritance:
:member-order: bysource

MultivariateNormal
------------------
.. autoclass:: numpyro.distributions.continuous.MultivariateNormal
:members:
:undoc-members:
:show-inheritance:
:member-order: bysource

Normal
------
.. autoclass:: numpyro.distributions.continuous.Normal
Expand Down Expand Up @@ -265,6 +273,13 @@ Poisson
:show-inheritance:
:member-order: bysource

PRNGIdentity
------------
.. autoclass:: numpyro.distributions.discrete.PRNGIdentity
:members:
:undoc-members:
:show-inheritance:
:member-order: bysource

Constraints
===========
Expand Down
1 change: 1 addition & 0 deletions examples/baseball.py
Original file line number Diff line number Diff line change
Expand Up @@ -197,6 +197,7 @@ def main(args):


if __name__ == "__main__":
assert numpyro.__version__.startswith('0.2.0')
parser = argparse.ArgumentParser(description="Baseball batting average using HMC")
parser.add_argument("-n", "--num-samples", nargs="?", default=3000, type=int)
parser.add_argument("--num-warmup", nargs='?', default=1500, type=int)
Expand Down
1 change: 1 addition & 0 deletions examples/bnn.py
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,7 @@ def main(args):


if __name__ == "__main__":
assert numpyro.__version__.startswith('0.2.0')
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)
Expand Down
1 change: 1 addition & 0 deletions examples/covtype.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ def main(args):


if __name__ == '__main__':
assert numpyro.__version__.startswith('0.2.0')
parser = argparse.ArgumentParser(description="parse args")
parser.add_argument('-n', '--num-samples', default=100, type=int, help='number of samples')
parser.add_argument('--num-steps', default=10, type=int, help='number of steps (for "HMC")')
Expand Down
1 change: 1 addition & 0 deletions examples/funnel.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ def main(args):


if __name__ == "__main__":
assert numpyro.__version__.startswith('0.2.0')
parser = argparse.ArgumentParser(description="Non-centered reparameterization example")
parser.add_argument("-n", "--num-samples", nargs="?", default=1000, type=int)
parser.add_argument("--num-warmup", nargs='?', default=1000, type=int)
Expand Down
1 change: 1 addition & 0 deletions examples/gp.py
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,7 @@ def main(args):


if __name__ == "__main__":
assert numpyro.__version__.startswith('0.2.0')
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)
Expand Down
1 change: 1 addition & 0 deletions examples/hmm.py
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,7 @@ def main(args):


if __name__ == '__main__':
assert numpyro.__version__.startswith('0.2.0')
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)
Expand Down
1 change: 1 addition & 0 deletions examples/minipyro.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ def body_fn(i, val):


if __name__ == "__main__":
assert numpyro.__version__.startswith('0.2.0')
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)
Expand Down
1 change: 1 addition & 0 deletions examples/neutra.py
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,7 @@ def main(args):


if __name__ == "__main__":
assert numpyro.__version__.startswith('0.2.0')
parser = argparse.ArgumentParser(description="NeuTra HMC")
parser.add_argument('-n', '--num-samples', nargs='?', default=20000, type=int)
parser.add_argument('--num-warmup', nargs='?', default=0, type=int)
Expand Down
1 change: 1 addition & 0 deletions examples/sparse_regression.py
Original file line number Diff line number Diff line change
Expand Up @@ -315,6 +315,7 @@ def main(args):


if __name__ == "__main__":
assert numpyro.__version__.startswith('0.2.0')
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)
Expand Down
1 change: 1 addition & 0 deletions examples/stochastic_volatility.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ def main(args):


if __name__ == "__main__":
assert numpyro.__version__.startswith('0.2.0')
parser = argparse.ArgumentParser(description="Stochastic Volatility Model")
parser.add_argument('-n', '--num-samples', nargs='?', default=3000, type=int)
parser.add_argument('--num-warmup', nargs='?', default=1500, type=int)
Expand Down
1 change: 1 addition & 0 deletions examples/ucbadmit.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@ def main(args):


if __name__ == '__main__':
assert numpyro.__version__.startswith('0.2.0')
parser = argparse.ArgumentParser(description='UCBadmit gender discrimination using HMC')
parser.add_argument('-n', '--num-samples', nargs='?', default=2000, type=int)
parser.add_argument('--num-warmup', nargs='?', default=500, type=int)
Expand Down
1 change: 1 addition & 0 deletions examples/vae.py
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,7 @@ def reconstruct_img(epoch, rng):


if __name__ == '__main__':
assert numpyro.__version__.startswith('0.2.0')
parser = argparse.ArgumentParser(description="parse args")
parser.add_argument('-n', '--num-epochs', default=20, type=int, help='number of training epochs')
parser.add_argument('-lr', '--learning-rate', default=1.0e-3, type=float, help='learning rate')
Expand Down
3 changes: 2 additions & 1 deletion notebooks/source/bayesian_regression.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,8 @@
" 'xtick.labelsize': 14,\n",
" 'ytick.labelsize': 14,\n",
" 'axes.titlesize': 'large', \n",
" 'axes.labelsize': 'medium'})"
" 'axes.labelsize': 'medium'})\n",
"assert numpyro.__version__.startswith('0.2.0')\n"
]
},
{
Expand Down
3 changes: 2 additions & 1 deletion notebooks/source/logistic_regression.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,8 @@
"from numpyro.examples.datasets import COVTYPE, load_dataset\n",
"from numpyro.hmc_util import initialize_model\n",
"from numpyro.mcmc import hmc, mcmc\n",
"from numpyro.util import fori_collect"
"from numpyro.util import fori_collect\n",
"assert numpyro.__version__.startswith('0.2.0')\n"
]
},
{
Expand Down
3 changes: 2 additions & 1 deletion notebooks/source/time_series_forecasting.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,8 @@
"from numpyro.diagnostics import autocorrelation, hpdi\n",
"from numpyro.distributions.util import softmax\n",
"from numpyro import handlers\n",
"from numpyro.mcmc import MCMC, NUTS"
"from numpyro.mcmc import MCMC, NUTS\n",
"assert numpyro.__version__.startswith('0.2.0')\n"
]
},
{
Expand Down
2 changes: 1 addition & 1 deletion numpyro/version.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = '0.1.0'
__version__ = '0.2.0'
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@

setup(
name='numpyro',
version='0.1.0',
version=version,
description='Pyro PPL on Numpy',
packages=find_packages(include=['numpyro', 'numpyro.*']),
url='https://github.com/pyro-ppl/numpyro',
Expand Down

0 comments on commit 4e97cb4

Please sign in to comment.