Optimizer for smoke tests?


#1

What should I use as an optimizer for smoke tests? I’m looking for something that will run a couple of iterations only and return essentially garbage results, but that will show whether my code crashes.


#2

We use Adam in most of our smoke tests. Take a look:

$ cd pyro
$ grep -R '\<optim\>' tests
tests/integration_tests/test_tracegraph_elbo.py:import pyro.optim as optim
tests/integration_tests/test_tracegraph_elbo.py:        adam = optim.Adam({"lr": .0015, "betas": (0.97, 0.999)})
tests/integration_tests/test_tracegraph_elbo.py:        adam = optim.Adam({"lr": .0015, "betas": (0.97, 0.999)})
tests/integration_tests/test_tracegraph_elbo.py:        adam = optim.Adam({"lr": lr, "betas": (beta1, 0.999)})
tests/integration_tests/test_tracegraph_elbo.py:        adam = optim.Adam({"lr": lr, "betas": (beta1, 0.999)})
tests/integration_tests/test_tracegraph_elbo.py:        adam = optim.Adam({"lr": 0.0008, "betas": (0.96, 0.999)})
tests/integration_tests/test_tracegraph_elbo.py:        adam = optim.Adam(per_param_callable)
tests/integration_tests/test_conjugate_gaussian_models.py:import pyro.optim as optim
tests/integration_tests/test_conjugate_gaussian_models.py:        adam = optim.Adam({"lr": lr, "betas": (0.95, 0.999)})
tests/integration_tests/test_conjugate_gaussian_models.py:        adam = optim.Adam({"lr": lr, "betas": (beta1, 0.999)})
...