Skip to content

Commit

Permalink
Bump up Pyro version to 0.4.0 (#2008)
Browse files Browse the repository at this point in the history
* Bump up version to 0.4.0

* update torchvision
  • Loading branch information
neerajprad authored and jpchen committed Aug 10, 2019
1 parent ac37ad1 commit 4a371ec
Show file tree
Hide file tree
Showing 44 changed files with 45 additions and 45 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.4')
assert pyro.__version__.startswith('0.4.0')
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 @@ -359,7 +359,7 @@ def main(args):


if __name__ == "__main__":
assert pyro.__version__.startswith('0.3.4')
assert pyro.__version__.startswith('0.4.0')
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.4')
assert pyro.__version__.startswith('0.4.0')
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 @@ -72,7 +72,7 @@ def main(args):


if __name__ == '__main__':
assert pyro.__version__.startswith('0.3.4')
assert pyro.__version__.startswith('0.4.0')
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 @@ -64,7 +64,7 @@ def main(args):


if __name__ == "__main__":
assert pyro.__version__.startswith('0.3.4')
assert pyro.__version__.startswith('0.4.0')
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 @@ -102,7 +102,7 @@ def main(args):


if __name__ == '__main__':
assert pyro.__version__.startswith('0.3.4')
assert pyro.__version__.startswith('0.4.0')
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 @@ -162,7 +162,7 @@ def main(args):


if __name__ == '__main__':
assert pyro.__version__.startswith('0.3.4')
assert pyro.__version__.startswith('0.4.0')
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 @@ -112,7 +112,7 @@ def main(num_vi_steps, num_bo_steps, seed):


if __name__ == "__main__":
assert pyro.__version__.startswith('0.3.4')
assert pyro.__version__.startswith('0.4.0')
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.4')
assert pyro.__version__.startswith('0.4.0')

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 @@ -40,7 +40,7 @@ def main(args):


if __name__ == '__main__':
assert pyro.__version__.startswith('0.3.4')
assert pyro.__version__.startswith('0.4.0')
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 @@ -72,7 +72,7 @@ def main(args):


if __name__ == '__main__':
assert pyro.__version__.startswith('0.3.4')
assert pyro.__version__.startswith('0.4.0')
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 @@ -626,7 +626,7 @@ def main(args):


if __name__ == '__main__':
assert pyro.__version__.startswith('0.3.4')
assert pyro.__version__.startswith('0.4.0')
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.4')
assert pyro.__version__.startswith('0.4.0')
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 @@ -135,7 +135,7 @@ def main(args):


if __name__ == '__main__':
assert pyro.__version__.startswith('0.3.4')
assert pyro.__version__.startswith('0.4.0')
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 @@ -46,7 +46,7 @@ def main(args):


if __name__ == "__main__":
assert pyro.__version__.startswith('0.3.4')
assert pyro.__version__.startswith('0.4.0')
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 @@ -63,7 +63,7 @@ def guide(data):


if __name__ == "__main__":
assert pyro.__version__.startswith('0.3.4')
assert pyro.__version__.startswith('0.4.0')
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.4')
assert pyro.__version__.startswith('0.4.0')
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.4')
assert pyro.__version__.startswith('0.4.0')
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 @@ -73,7 +73,7 @@ def main(args):


if __name__ == '__main__':
assert pyro.__version__.startswith('0.3.4')
assert pyro.__version__.startswith('0.4.0')
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 @@ -86,7 +86,7 @@ def main(args):


if __name__ == '__main__':
assert pyro.__version__.startswith('0.3.4')
assert pyro.__version__.startswith('0.4.0')
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.4')
assert pyro.__version__.startswith('0.4.0')
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 @@ -231,7 +231,7 @@ def main(args):


if __name__ == '__main__':
assert pyro.__version__.startswith('0.3.4')
assert pyro.__version__.startswith('0.4.0')
# 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/sparse_regression.py
Original file line number Diff line number Diff line change
Expand Up @@ -306,7 +306,7 @@ def main(args):


if __name__ == '__main__':
assert pyro.__version__.startswith('0.3.4')
assert pyro.__version__.startswith('0.4.0')
parser = argparse.ArgumentParser(description='Krylov KIT')
parser.add_argument('--num-data', type=int, default=750)
parser.add_argument('--num-steps', type=int, default=1000)
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.4')
assert pyro.__version__.startswith('0.4.0')

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.4')
assert pyro.__version__.startswith('0.4.0')
# 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 @@ -243,7 +243,7 @@ def main(args):


if __name__ == '__main__':
assert pyro.__version__.startswith('0.3.4')
assert pyro.__version__.startswith('0.4.0')
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 @@ -5,7 +5,7 @@
plate, random_module, sample, validation_enabled)
from pyro.util import set_rng_seed

version_prefix = '0.3.4'
version_prefix = '0.4.0'

# Get the __version__ string from the auto-generated _version.py file, if exists.
try:
Expand Down
4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
'jupyter>=1.0.0',
'matplotlib>=1.3',
'pillow',
'torchvision>=0.2.2',
'torchvision>=0.4.0',
'visdom>=0.1.4',
'pandas',
'seaborn',
Expand All @@ -84,7 +84,7 @@
# numpy is necessary for some functionality of PyTorch
'numpy>=1.7',
'opt_einsum>=2.3.2',
'torch>=1.1.0',
'torch>=1.2.0',
'tqdm>=4.31',
],
extras_require={
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.4')\n",
"assert pyro.__version__.startswith('0.4.0')\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.4')\n",
"assert pyro.__version__.startswith('0.4.0')\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 @@ -39,7 +39,7 @@
"import pyro.optim as optim\n",
"\n",
"pyro.set_rng_seed(1)\n",
"assert pyro.__version__.startswith('0.3.4')"
"assert pyro.__version__.startswith('0.4.0')"
]
},
{
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.4')\n",
"assert pyro.__version__.startswith('0.4.0')\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.4')"
"assert pyro.__version__.startswith('0.4.0')"
]
},
{
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.4')\n",
"assert pyro.__version__.startswith('0.4.0')\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.4')\n",
"assert pyro.__version__.startswith('0.4.0')\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 @@ -41,7 +41,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.4')\n",
"assert pyro.__version__.startswith('0.4.0')\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 @@ -60,7 +60,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.4')\n",
"assert pyro.__version__.startswith('0.4.0')\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.4')\n",
"assert pyro.__version__.startswith('0.4.0')\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.4')\n",
"assert pyro.__version__.startswith('0.4.0')\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 @@ -265,7 +265,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.4')\n",
"assert pyro.__version__.startswith('0.4.0')\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 @@ -284,7 +284,7 @@
"import sys\n",
"\n",
"# enable validation (e.g. validate parameters of distributions)\n",
"assert pyro.__version__.startswith('0.3.4')\n",
"assert pyro.__version__.startswith('0.4.0')\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.4')\n",
"assert pyro.__version__.startswith('0.4.0')\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 @@ -30,7 +30,7 @@
"from pyro.optim import Adam\n",
"\n",
"%matplotlib inline\n",
"assert pyro.__version__.startswith('0.3.4')\n",
"assert pyro.__version__.startswith('0.4.0')\n",
"pyro.enable_validation(True)\n",
"smoke_test = ('CI' in os.environ)"
]
Expand Down
Loading

0 comments on commit 4a371ec

Please sign in to comment.