github pymc-devs/pymc v3.10.0
PyMC3 v3.10.0 (7 December 2020)

latest releases: v5.11.0, v5.10.4, v5.10.3...
3 years ago

This is a major release with many exciting new features. The biggest change is that we now rely on our own fork of Theano-PyMC. This is in line with our big announcement about our commitment to PyMC3 and Theano.

When upgrading, make sure that Theano-PyMC and not Theano are installed (the imports remain unchanged, however). If not, you can uninstall Theano:

conda remove theano

And to install:

conda install -c conda-forge theano-pymc

Or, if you are using pip (not recommended):

pip uninstall theano

And to install:

pip install theano-pymc

This new version of Theano-PyMC comes with an experimental JAX backend which, when combined with the new and experimental JAX samplers in PyMC3, can greatly speed up sampling in your model. As this is still very new, please do not use it in production yet but do test it out and let us know if anything breaks and what results you are seeing, especially speed-wise.

New features

  • New experimental JAX samplers in pymc3.sample_jax (see notebook and #4247). Requires JAX and either TFP or numpyro.
  • Add MLDA, a new stepper for multilevel sampling. MLDA can be used when a hierarchy of approximate posteriors of varying accuracy is available, offering improved sampling efficiency especially in high-dimensional problems and/or where gradients are not available (see #3926)
  • Add Bayesian Additive Regression Trees (BARTs) #4183)
  • Added pymc3.gp.cov.Circular kernel for Gaussian Processes on circular domains, e.g. the unit circle (see #4082).
  • Added a new MixtureSameFamily distribution to handle mixtures of arbitrary dimensions in vectorized form for improved speed (see #4185).
  • sample_posterior_predictive_w can now feed on xarray.Dataset - e.g. from InferenceData.posterior. (see #4042)
  • Change SMC metropolis kernel to independent metropolis kernel #4115)
  • Add alternative parametrization to NegativeBinomial distribution in terms of n and p (see #4126)
  • Added semantically meaningful str representations to PyMC3 objects for console, notebook, and GraphViz use (see #4076, #4065, #4159, #4217, #4243, and #4260).
  • Add Discrete HyperGeometric Distribution (see #4249)

Maintenance

  • Switch the dependency of Theano to our own fork, Theano-PyMC.
  • Removed non-NDArray (Text, SQLite, HDF5) backends and associated tests.
  • Use dill to serialize user defined logp functions in DensityDist. The previous serialization code fails if it is used in notebooks on Windows and Mac. dill is now a required dependency. (see #3844).
  • Fixed numerical instability in ExGaussian's logp by preventing logpow from returning -inf (see #4050).
  • Numerically improved stickbreaking transformation - e.g. for the Dirichlet distribution. #4129
  • Enabled the Multinomial distribution to handle batch sizes that have more than 2 dimensions. #4169
  • Test model logp before starting any MCMC chains (see #4211)
  • Fix bug in model.check_test_point that caused the test_point argument to be ignored. (see PR #4211)
  • Refactored MvNormal.random method with better handling of sample, batch and event shapes. #4207
  • The InverseGamma distribution now implements a logcdf. #3944
  • Make starting jitter methods for nuts sampling more robust by resampling values that lead to non-finite probabilities. A new optional argument jitter-max-retries can be passed to pm.sample() and pm.init_nuts() to control the maximum number of retries per chain. 4298

Documentation

  • Added a new notebook demonstrating how to incorporate sampling from a conjugate Dirichlet-multinomial posterior density in conjunction with other step methods (see #4199).
  • Mentioned the way to do any random walk with theano.tensor.cumsum() in GaussianRandomWalk docstrings (see #4048).

Release manager for 3.10.0: Eelke Spaak (@Spaak)

Don't miss a new pymc release

NewReleases is sending notifications on new releases.