PyMC3 3.11.0 (21 January 2021)
This release breaks some APIs w.r.t. 3.10.0
. It also brings some dreadfully awaited fixes, so be sure to go through the (breaking) changes below.
Breaking Changes
- ⚠ Many plotting and diagnostic functions that were just aliasing ArviZ functions were removed (see 4397). This includes
pm.summary
,pm.traceplot
,pm.ess
and many more! - Changed shape behavior: No longer collapse length 1 vector shape into scalars. (see #4206 and #4214)
- ⚠ We now depend on
Theano-PyMC
version1.1.0
exactly (see #4405). Major refactorings were done inTheano-PyMC
1.1.0. If you implement customOp
s or interact with Theano in any way yourself, make sure to read the Theano-PyMC 1.1.0 release notes. - ⚠ Python 3.6 support was dropped (by no longer testing) and Python 3.9 was added (see #4332).
- ⚠ Changed shape behavior: No longer collapse length 1 vector shape into scalars. (see #4206 and #4214)
- Applies to random variables and also the
.random(size=...)
kwarg! - To create scalar variables you must now use
shape=None
orshape=()
. shape=(1,)
andshape=1
now become vectors. Previously they were collapsed into scalars- 0-length dimensions are now ruled illegal for random variables and raise a
ValueError
.
- Applies to random variables and also the
- In
sample_prior_predictive
thevars
kwarg was removed in favor ofvar_names
(see #4327). - Removed
theanof.set_theano_config
because it illegally changed Theano's internal state (see #4329).
New Features
- Option to set
check_bounds=False
when instantiatingpymc3.Model()
. This turns off bounds checks that ensure that input parameters of distributions are valid. For correctly specified models, this is unneccessary as all parameters get automatically transformed so that all values are valid. Turning this off should lead to faster sampling (see #4377). OrderedProbit
distribution added (see #4232).plot_posterior_predictive_glm
now works witharviz.InferenceData
as well (see #4234)- Add
logcdf
method to all univariate discrete distributions (see #4387). - Add
random
method toMvGaussianRandomWalk
(see #4388) AsymmetricLaplace
distribution added (see #4392).DirichletMultinomial
distribution added (see #4373).- Added a new
predict
method toBART
to compute out of sample predictions (see #4310).
Maintenance
- Fixed bug whereby partial traces returns after keyboard interrupt during parallel sampling had fewer draws than would've been available #4318
- Make
sample_shape
same across all contexts indraw_values
(see #4305). - The notebook gallery has been moved to https://github.com/pymc-devs/pymc-examples (see #4348).
math.logsumexp
now matchesscipy.special.logsumexp
when arrays contain infinite values (see #4360).- Fixed mathematical formulation in
MvStudentT
random method. (see #4359) - Fix issue in
logp
method ofHyperGeometric
. It now returns-inf
for invalid parameters (see 4367) - Fixed
MatrixNormal
random method to work with parameters as random variables. (see #4368) - Update the
logcdf
method of several continuous distributions to return -inf for invalid parameters and values, and raise an informative error when multiple values cannot be evaluated in a single call. (see 4393 and #4421) - Improve numerical stability in
logp
andlogcdf
methods ofExGaussian
(see #4407) - Issue UserWarning when doing prior or posterior predictive sampling with models containing Potential factors (see #4419)
- Dirichlet distribution's
random
method is now optimized and gives outputs in correct shape (see #4416) - Attempting to sample a named model with SMC will now raise a
NotImplementedError
. (see #4365)
Release manager for 3.11.0: Eelke Spaak (@Spaak)