New features
- Update to PyTorch 1.9 2887
- A [StreamingMCMC](https://docs.pyro.ai/en/latest/mcmc.html#streamingmcmc) class for high-dimensional Bayesian inference using NUTS or HMC, thanks to mtsokol 2857 .
`StreamingMCMC` is a drop-in replacement for `MCMC` that avoids storing samples during inference by streamingly computing statistics such as mean, variance, and r_hat. You can define your own statistics using the [pyro.ops.streaming](https://docs.pyro.ai/en/latest/ops.html#module-pyro.ops.streaming) module by either composing existing statistics or defining your own subclass of [StreamingStats](https://docs.pyro.ai/en/latest/ops.html#pyro.ops.streaming.StreamingStats) 2856 .
- Make `poutine.reparam` compatible with initialization logic in autoguides and MCMC 2876 . Previously you needed to manually transform the value in [init_to_value()](https://docs.pyro.ai/en/dev/infer.autoguide.html#pyro.infer.autoguide.initialization.init_to_value) when using a reparametrizer. In Pyro 1.7 you can specify a single `init_to_value()` output that should work regardless of whether your model is transformed by a reparametrizer. Note this involves a major refactoring of the [Reparam](https://docs.pyro.ai/en/latest/infer.reparam.html) interface, namely replacing [.__call__()](https://docs.pyro.ai/en/latest/infer.reparam.html#pyro.infer.reparam.reparam.Reparam.__call__) with [.apply()](https://docs.pyro.ai/en/latest/infer.reparam.html#pyro.infer.reparam.reparam.Reparam.apply). If you have defined custom reparametrizers using `.__call__()` you should refactor them before the next Pyro release.
- Add an [AutoStructured](https://docs.pyro.ai/en/latest/infer.autoguide.html#autostructured) guide with flexible distributions, sparse flexible dependencies among latent variables, and support for reparametrization 2812 . This autoguide is somewhere between [AutoNormal](https://docs.pyro.ai/en/latest/infer.autoguide.html#autonormal) and [AutoIAFNormal](https://docs.pyro.ai/en/latest/infer.autoguide.html#autoiafnormal)+[NeuTraReparam](https://docs.pyro.ai/en/latest/infer.reparam.html#pyro.infer.reparam.neutra.NeuTraReparam). Like `AutoNormal` this guide is interpretable and structured. Like `NeuTraReparam` this guide is flexible and can be used to improve geometry for subsequent inference via HMC or NUTS.
- New directional distributions thanks to OlaRonning
- [SinSkewedToroidal](https://docs.pyro.ai/en/latest/distributions.html#sineskewed) 2826
- [SinBivariateVonMises](https://docs.pyro.ai/en/latest/distributions.html#sinebivariatevonmises) 2821
- New distributions over [genetic and amino acid sequences](https://docs.pyro.ai/en/stable/contrib.mue.html#), thanks to EWeinstein 2728
(see https://www.biorxiv.org/content/10.1101/2020.07.31.231381v2)
- New distributions with exponential tails
- [Logistic](https://docs.pyro.ai/en/latest/distributions.html#logistic) 2895
- [SkewLogistic](https://docs.pyro.ai/en/latest/distributions.html#skewlogistic) 2874
- [AsymmetricLaplace](https://docs.pyro.ai/en/latest/distributions.html#asymmetriclaplace) 2850
- [SoftLaplace](https://docs.pyro.ai/en/latest/distributions.html#softlaplace) 2791
- [SoftAsymmetricLaplace](https://docs.pyro.ai/en/latest/distributions.html#softasymmetriclaplace) 2872
- Add [AutoGuideList.quantiles()](https://docs.pyro.ai/en/latest/infer.autoguide.html#pyro.infer.autoguide.AutoGuideList.quantiles) thanks to vitkl 2896
- Allow saving a subset of variables in [MCMC](https://docs.pyro.ai/en/dev/mcmc.html#pyro.infer.mcmc.api.MCMC) via the `save_params` option, which can save memory 2793
- Add a sample option to `pyro.contrib.funsor.infer_discrete` 2789
New tutorials
- A [predictive and deterministic](https://pyro.ai/examples/predictive_deterministic.html) tutorial thanks to mtsokol #2852
- [ProfileHMM with MuE](https://pyro.ai/examples/mue_profile.html) by EWeinstein #2728
- [Factor MuE and Probabilistic PCA](https://pyro.ai/examples/mue_factor.html) by EWeinstein #2728
- Add ordabayevy's trick to the [enumeration tutorial](https://pyro.ai/examples/enumeration.html) #2892
- Enhance the [LDA tutorial](https://pyro.ai/examples/prodlda.html) #2790
Bug fixes
- Fix `poutine.do` to avoid duplicate entries in `cond_indep_stack` 2846
- Fix `infer.csis` to ignore unused gradients, thanks to fshipy 2828
- Catch NAN values in TraceENUM_ELBO grads 2782
Breaking changes
- Simplify param names in callable optim configs 2814
- Switch to softplus transform when using autoguide scales, thanks to [experiments](https://github.com/pyro-ppl/sandbox/pull/14) performed by vitkl #2823
Ceanup
- Start using `mypy` for type checking, thanks to kamathhrishi 2853 2858
- Start using `black` code formatter 2891