Skip to content

Commit

Permalink
Bump Pyro version to 0.3.4 (#1959)
Browse files Browse the repository at this point in the history
  • Loading branch information
neerajprad authored and fritzo committed Jul 16, 2019
1 parent e03ec0d commit 199520f
Show file tree
Hide file tree
Showing 43 changed files with 44 additions and 50 deletions.
2 changes: 1 addition & 1 deletion examples/air/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,7 @@ def per_param_optim_args(module_name, param_name):


if __name__ == '__main__':
assert pyro.__version__.startswith('0.3.3')
assert pyro.__version__.startswith('0.3.4')
parser = argparse.ArgumentParser(description="Pyro AIR example", argument_default=argparse.SUPPRESS)
parser.add_argument('-n', '--num-steps', type=int, default=int(1e8),
help='number of optimization steps to take')
Expand Down
2 changes: 1 addition & 1 deletion examples/baseball.py
Original file line number Diff line number Diff line change
Expand Up @@ -362,7 +362,7 @@ def main(args):


if __name__ == "__main__":
assert pyro.__version__.startswith('0.3.3')
assert pyro.__version__.startswith('0.3.4')
parser = argparse.ArgumentParser(description="Baseball batting average using HMC")
parser.add_argument("-n", "--num-samples", nargs="?", default=200, type=int)
parser.add_argument("--num-chains", nargs='?', default=4, type=int)
Expand Down
2 changes: 1 addition & 1 deletion examples/bayesian_regression.py
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ def main(args):


if __name__ == '__main__':
assert pyro.__version__.startswith('0.3.3')
assert pyro.__version__.startswith('0.3.4')
parser = argparse.ArgumentParser(description="parse args")
parser.add_argument('-n', '--num-epochs', default=1000, type=int)
parser.add_argument('-b', '--batch-size', default=N, type=int)
Expand Down
2 changes: 1 addition & 1 deletion examples/contrib/autoname/mixture.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ def main(args):


if __name__ == '__main__':
assert pyro.__version__.startswith('0.3.3')
assert pyro.__version__.startswith('0.3.4')
parser = argparse.ArgumentParser(description="parse args")
parser.add_argument('-n', '--num-epochs', default=200, type=int)
parser.add_argument('--jit', action='store_true')
Expand Down
2 changes: 1 addition & 1 deletion examples/contrib/autoname/scoping_mixture.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ def main(args):


if __name__ == "__main__":
assert pyro.__version__.startswith('0.3.3')
assert pyro.__version__.startswith('0.3.4')
parser = argparse.ArgumentParser(description="parse args")
parser.add_argument('-n', '--num-epochs', default=200, type=int)
args = parser.parse_args()
Expand Down
2 changes: 1 addition & 1 deletion examples/contrib/autoname/tree_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ def main(args):


if __name__ == '__main__':
assert pyro.__version__.startswith('0.3.3')
assert pyro.__version__.startswith('0.3.4')
parser = argparse.ArgumentParser(description="parse args")
parser.add_argument('-n', '--num-epochs', default=100, type=int)
args = parser.parse_args()
Expand Down
2 changes: 1 addition & 1 deletion examples/contrib/gp/sv-dkl.py
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ def main(args):


if __name__ == '__main__':
assert pyro.__version__.startswith('0.3.3')
assert pyro.__version__.startswith('0.3.4')
parser = argparse.ArgumentParser(description='Pyro GP MNIST Example')
parser.add_argument('--data-dir', type=str, default=None, metavar='PATH',
help='default directory to cache MNIST data')
Expand Down
2 changes: 1 addition & 1 deletion examples/contrib/oed/ab_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ def main(num_vi_steps, num_bo_steps, seed):


if __name__ == "__main__":
assert pyro.__version__.startswith('0.3.3')
assert pyro.__version__.startswith('0.3.4')
parser = argparse.ArgumentParser(description="A/B test experiment design using VI")
parser.add_argument("-n", "--num-vi-steps", nargs="?", default=5000, type=int)
parser.add_argument('--num-bo-steps', nargs="?", default=5, type=int)
Expand Down
2 changes: 1 addition & 1 deletion examples/dmm/dmm.py
Original file line number Diff line number Diff line change
Expand Up @@ -432,7 +432,7 @@ def do_evaluation():

# parse command-line arguments and execute the main method
if __name__ == '__main__':
assert pyro.__version__.startswith('0.3.3')
assert pyro.__version__.startswith('0.3.4')

parser = argparse.ArgumentParser(description="parse args")
parser.add_argument('-n', '--num-epochs', type=int, default=5000)
Expand Down
2 changes: 1 addition & 1 deletion examples/eight_schools/mcmc.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ def main(args):


if __name__ == '__main__':
assert pyro.__version__.startswith('0.3.3')
assert pyro.__version__.startswith('0.3.4')
parser = argparse.ArgumentParser(description='Eight Schools MCMC')
parser.add_argument('--num-samples', type=int, default=1000,
help='number of MCMC samples (default: 1000)')
Expand Down
2 changes: 1 addition & 1 deletion examples/eight_schools/svi.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ def main(args):


if __name__ == '__main__':
assert pyro.__version__.startswith('0.3.3')
assert pyro.__version__.startswith('0.3.4')
parser = argparse.ArgumentParser(description='Eight Schools SVI')
parser.add_argument('--lr', type=float, default=0.01,
help='learning rate (default: 0.01)')
Expand Down
2 changes: 1 addition & 1 deletion examples/hmm.py
Original file line number Diff line number Diff line change
Expand Up @@ -616,7 +616,7 @@ def main(args):


if __name__ == '__main__':
assert pyro.__version__.startswith('0.3.3')
assert pyro.__version__.startswith('0.3.4')
parser = argparse.ArgumentParser(description="MAP Baum-Welch learning Bach Chorales")
parser.add_argument("-m", "--model", default="1", type=str,
help="one of: {}".format(", ".join(sorted(models.keys()))))
Expand Down
2 changes: 1 addition & 1 deletion examples/inclined_plane.py
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ def main(args):


if __name__ == '__main__':
assert pyro.__version__.startswith('0.3.3')
assert pyro.__version__.startswith('0.3.4')
parser = argparse.ArgumentParser(description="parse args")
parser.add_argument('-n', '--num-samples', default=500, type=int)
args = parser.parse_args()
Expand Down
2 changes: 1 addition & 1 deletion examples/lda.py
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ def main(args):


if __name__ == '__main__':
assert pyro.__version__.startswith('0.3.3')
assert pyro.__version__.startswith('0.3.4')
parser = argparse.ArgumentParser(description="Amortized Latent Dirichlet Allocation")
parser.add_argument("-t", "--num-topics", default=8, type=int)
parser.add_argument("-w", "--num-words", default=1024, type=int)
Expand Down
2 changes: 1 addition & 1 deletion examples/lkj.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ def main(args):


if __name__ == "__main__":
assert pyro.__version__.startswith('0.3.3')
assert pyro.__version__.startswith('0.3.4')
parser = argparse.ArgumentParser(description="Demonstrate the use of an LKJ Prior")
parser.add_argument("--num-samples", nargs="?", default=200, type=int)
parser.add_argument("--n", nargs="?", default=500, type=int)
Expand Down
2 changes: 1 addition & 1 deletion examples/minipyro.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ def guide(data):


if __name__ == "__main__":
assert pyro.__version__.startswith('0.3.3')
assert pyro.__version__.startswith('0.3.4')
parser = argparse.ArgumentParser(description="Mini Pyro demo")
parser.add_argument("-b", "--backend", default="minipyro")
parser.add_argument("-n", "--num-steps", default=1001, type=int)
Expand Down
2 changes: 1 addition & 1 deletion examples/rsa/generics.py
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ def main(args):


if __name__ == "__main__":
assert pyro.__version__.startswith('0.3.3')
assert pyro.__version__.startswith('0.3.4')
parser = argparse.ArgumentParser(description="parse args")
parser.add_argument('-n', '--num-samples', default=10, type=int)
args = parser.parse_args()
Expand Down
2 changes: 1 addition & 1 deletion examples/rsa/hyperbole.py
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ def main(args):


if __name__ == "__main__":
assert pyro.__version__.startswith('0.3.3')
assert pyro.__version__.startswith('0.3.4')
parser = argparse.ArgumentParser(description="parse args")
parser.add_argument('-n', '--num-samples', default=10, type=int)
parser.add_argument('--price', default=10000, type=int)
Expand Down
2 changes: 1 addition & 1 deletion examples/rsa/schelling.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ def main(args):


if __name__ == '__main__':
assert pyro.__version__.startswith('0.3.3')
assert pyro.__version__.startswith('0.3.4')
parser = argparse.ArgumentParser(description="parse args")
parser.add_argument('-n', '--num-samples', default=10, type=int)
parser.add_argument('--depth', default=2, type=int)
Expand Down
2 changes: 1 addition & 1 deletion examples/rsa/schelling_false.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ def main(args):


if __name__ == '__main__':
assert pyro.__version__.startswith('0.3.3')
assert pyro.__version__.startswith('0.3.4')
parser = argparse.ArgumentParser(description="parse args")
parser.add_argument('-n', '--num-samples', default=10, type=int)
parser.add_argument('--depth', default=3, type=int)
Expand Down
2 changes: 1 addition & 1 deletion examples/rsa/semantic_parsing.py
Original file line number Diff line number Diff line change
Expand Up @@ -337,7 +337,7 @@ def is_all_qud(world):


if __name__ == "__main__":
assert pyro.__version__.startswith('0.3.3')
assert pyro.__version__.startswith('0.3.4')
parser = argparse.ArgumentParser(description="parse args")
parser.add_argument('-n', '--num-samples', default=10, type=int)
args = parser.parse_args()
Expand Down
2 changes: 1 addition & 1 deletion examples/sparse_gamma_def.py
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@ def main(args):


if __name__ == '__main__':
assert pyro.__version__.startswith('0.3.3')
assert pyro.__version__.startswith('0.3.4')
# parse command line arguments
parser = argparse.ArgumentParser(description="parse args")
parser.add_argument('-n', '--num-epochs', default=1500, type=int, help='number of training epochs')
Expand Down
2 changes: 1 addition & 1 deletion examples/vae/ss_vae_M2.py
Original file line number Diff line number Diff line change
Expand Up @@ -380,7 +380,7 @@ def main(args):
"-sup 3000 -zd 50 -hl 500 -lr 0.00042 -b1 0.95 -bs 200 -log ./tmp.log"

if __name__ == "__main__":
assert pyro.__version__.startswith('0.3.3')
assert pyro.__version__.startswith('0.3.4')

parser = argparse.ArgumentParser(description="SS-VAE\n{}".format(EXAMPLE_RUN))

Expand Down
2 changes: 1 addition & 1 deletion examples/vae/vae.py
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ def main(args):


if __name__ == '__main__':
assert pyro.__version__.startswith('0.3.3')
assert pyro.__version__.startswith('0.3.4')
# parse command line arguments
parser = argparse.ArgumentParser(description="parse args")
parser.add_argument('-n', '--num-epochs', default=101, type=int, help='number of training epochs')
Expand Down
2 changes: 1 addition & 1 deletion examples/vae/vae_comparison.py
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,7 @@ def main(args):


if __name__ == '__main__':
assert pyro.__version__.startswith('0.3.3')
assert pyro.__version__.startswith('0.3.4')
parser = argparse.ArgumentParser(description='VAE using MNIST dataset')
parser.add_argument('-n', '--num-epochs', nargs='?', default=10, type=int)
parser.add_argument('--batch_size', nargs='?', default=128, type=int)
Expand Down
2 changes: 1 addition & 1 deletion pyro/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
plate, random_module, sample, validation_enabled)
from pyro.util import set_rng_seed

version_prefix = '0.3.3'
version_prefix = '0.3.4'

# Get the __version__ string from the auto-generated _version.py file, if exists.
try:
Expand Down
10 changes: 2 additions & 8 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,6 @@

# examples/tutorials
EXTRAS_REQUIRE = [
# TODO: remove once https://github.com/ipython/ipython/issues/11809 is fixed.
'ipython<7.6.0',
'jupyter>=1.0.0',
'matplotlib>=1.3',
'pillow',
Expand Down Expand Up @@ -99,9 +97,7 @@
'nbval',
'pytest>=4.1',
'pytest-cov',
# TODO: remove once https://github.com/pyro-ppl/pyro/issues/1871
# is fixed.
'scipy>=1.1, <1.3',
'scipy>=1.1',
],
'profile': ['prettytable', 'pytest-benchmark', 'snakeviz'],
'dev': EXTRAS_REQUIRE + [
Expand All @@ -115,9 +111,7 @@
'pypandoc',
'pytest>=4.1',
'pytest-xdist',
# TODO: remove once https://github.com/pyro-ppl/pyro/issues/1871
# is fixed.
'scipy>=1.1, < 1.3',
'scipy>=1.1',
'sphinx',
'sphinx_rtd_theme',
'yapf',
Expand Down
2 changes: 1 addition & 1 deletion tutorial/source/air.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
"import numpy as np\n",
"\n",
"smoke_test = ('CI' in os.environ)\n",
"assert pyro.__version__.startswith('0.3.3')\n",
"assert pyro.__version__.startswith('0.3.4')\n",
"pyro.enable_validation(True)"
]
},
Expand Down
2 changes: 1 addition & 1 deletion tutorial/source/bayesian_regression.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
"\n",
"# for CI testing\n",
"smoke_test = ('CI' in os.environ)\n",
"assert pyro.__version__.startswith('0.3.3')\n",
"assert pyro.__version__.startswith('0.3.4')\n",
"pyro.enable_validation(True)\n",
"pyro.set_rng_seed(1)\n",
"pyro.enable_validation(True)"
Expand Down
2 changes: 1 addition & 1 deletion tutorial/source/bayesian_regression_ii.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
"import pyro.optim as optim\n",
"\n",
"pyro.set_rng_seed(1)\n",
"assert pyro.__version__.startswith('0.3.3')"
"assert pyro.__version__.startswith('0.3.4')"
]
},
{
Expand Down
2 changes: 1 addition & 1 deletion tutorial/source/bo.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
"import pyro\n",
"import pyro.contrib.gp as gp\n",
"\n",
"assert pyro.__version__.startswith('0.3.3')\n",
"assert pyro.__version__.startswith('0.3.4')\n",
"pyro.enable_validation(True) # can help with debugging\n",
"pyro.set_rng_seed(1)"
]
Expand Down
2 changes: 1 addition & 1 deletion tutorial/source/easyguide.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
"\n",
"pyro.enable_validation(True)\n",
"smoke_test = ('CI' in os.environ)\n",
"assert pyro.__version__.startswith('0.3.3')"
"assert pyro.__version__.startswith('0.3.4')"
]
},
{
Expand Down
2 changes: 1 addition & 1 deletion tutorial/source/ekf.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@
"from pyro.contrib.tracking.measurements import PositionMeasurement\n",
"\n",
"smoke_test = ('CI' in os.environ)\n",
"assert pyro.__version__.startswith('0.3.3')\n",
"assert pyro.__version__.startswith('0.3.4')\n",
"pyro.enable_validation(True)"
]
},
Expand Down
2 changes: 1 addition & 1 deletion tutorial/source/enumeration.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
"from pyro.ops.indexing import Vindex\n",
"\n",
"smoke_test = ('CI' in os.environ)\n",
"assert pyro.__version__.startswith('0.3.3')\n",
"assert pyro.__version__.startswith('0.3.4')\n",
"pyro.enable_validation()\n",
"pyro.set_rng_seed(0)"
]
Expand Down
2 changes: 1 addition & 1 deletion tutorial/source/gmm.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
"from pyro.infer import SVI, TraceEnum_ELBO, config_enumerate, infer_discrete\n",
"\n",
"smoke_test = ('CI' in os.environ)\n",
"assert pyro.__version__.startswith('0.3.3')\n",
"assert pyro.__version__.startswith('0.3.4')\n",
"pyro.enable_validation(True)"
]
},
Expand Down
2 changes: 1 addition & 1 deletion tutorial/source/gp.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@
"import pyro.distributions as dist\n",
"\n",
"smoke_test = ('CI' in os.environ) # ignore; used to check code integrity in the Pyro repo\n",
"assert pyro.__version__.startswith('0.3.3')\n",
"assert pyro.__version__.startswith('0.3.4')\n",
"pyro.enable_validation(True) # can help with debugging\n",
"pyro.set_rng_seed(0)"
]
Expand Down
2 changes: 1 addition & 1 deletion tutorial/source/gplvm.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
"import pyro.ops.stats as stats\n",
"\n",
"smoke_test = ('CI' in os.environ) # ignore; used to check code integrity in the Pyro repo\n",
"assert pyro.__version__.startswith('0.3.3')\n",
"assert pyro.__version__.startswith('0.3.4')\n",
"pyro.enable_validation(True) # can help with debugging\n",
"pyro.set_rng_seed(1)"
]
Expand Down
2 changes: 1 addition & 1 deletion tutorial/source/jit.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
"from pyro.optim import Adam\n",
"\n",
"smoke_test = ('CI' in os.environ)\n",
"assert pyro.__version__.startswith('0.3.3')\n",
"assert pyro.__version__.startswith('0.3.4')\n",
"pyro.enable_validation(True) # <---- This is always a good idea!"
]
},
Expand Down
2 changes: 1 addition & 1 deletion tutorial/source/svi_part_i.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,7 @@
"n_steps = 2 if smoke_test else 2000\n",
"\n",
"# enable validation (e.g. validate parameters of distributions)\n",
"assert pyro.__version__.startswith('0.3.3')\n",
"assert pyro.__version__.startswith('0.3.4')\n",
"pyro.enable_validation(True)\n",
"\n",
"# clear the param store in case we're in a REPL\n",
Expand Down
2 changes: 1 addition & 1 deletion tutorial/source/svi_part_iii.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -285,7 +285,7 @@
"import sys\n",
"\n",
"# enable validation (e.g. validate parameters of distributions)\n",
"assert pyro.__version__.startswith('0.3.3')\n",
"assert pyro.__version__.startswith('0.3.4')\n",
"pyro.enable_validation(True)\n",
"\n",
"# this is for running the notebook in our testing framework\n",
Expand Down
2 changes: 1 addition & 1 deletion tutorial/source/tensor_shapes.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
"from pyro.optim import Adam\n",
"\n",
"smoke_test = ('CI' in os.environ)\n",
"assert pyro.__version__.startswith('0.3.3')\n",
"assert pyro.__version__.startswith('0.3.4')\n",
"pyro.enable_validation(True) # <---- This is always a good idea!\n",
"\n",
"# We'll ue this helper to check our models are correct.\n",
Expand Down
2 changes: 1 addition & 1 deletion tutorial/source/tracking_1d.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
"from pyro.optim import Adam\n",
"\n",
"%matplotlib inline\n",
"assert pyro.__version__.startswith('0.3.3')\n",
"assert pyro.__version__.startswith('0.3.4')\n",
"pyro.enable_validation(True)\n",
"smoke_test = ('CI' in os.environ)"
]
Expand Down
Loading

0 comments on commit 199520f

Please sign in to comment.