Check PR https://github.com/pymc-devs/pymc/pull/5143 and edit the RELEASE-NOTES.md on main
as usual via pull requests.
v3.11.5
→ v4.0.0
v3
.v4
.All of the above apply to:
theano
, tt
, and pymc3.theanof
need to be replaced with aesara
, at
, and pymc.aesaraf
(see 4471).pm.Distribution(...).logp(x)
is now pm.logp(pm.Distribution(...), x)
pm.Distribution(...).logcdf(x)
is now pm.logcdf(pm.Distribution(...), x)
pm.Distribution(...).random()
is now pm.Distribution(...).eval()
pm.draw_values(...)
and pm.generate_samples(...)
were removed. The tensors can now be evaluated with .eval()
.pm.fast_sample_posterior_predictive
was removed.pm.sample_prior_predictive
, pm.sample_posterior_predictive
and pm.sample_posterior_predictive_w
now return an InferenceData
object by default, instead of a dictionary (see #5073).pm.sample_prior_predictive
no longer returns transformed variable values by default. Pass them by name in var_names
if you want to obtain these draws (see 4769).pm.sample(trace=...)
no longer accepts MultiTrace
or len(.) > 0
traces (see 5019#).pm.Bound
interface no longer accepts a callable class as argument, instead it requires an instantiated distribution (created via the .dist()
API) to be passed as an argument. In addition, Bound no longer returns a class instance but works as a normal PyMC distribution. Finally, it is no longer possible to do predictive random sampling from Bounded variables. Please, consult the new documentation for details on how to use Bounded variables (see 4815).pm.logpt(transformed=...)
kwarg was removed (816b5f).Model(model=...)
kwarg was removedModel(theano_config=...)
kwarg was removedModel.size
property was removed (use Model.ndim
instead).dims
and coords
handling:
Model.update_start_values(...)
was removed. Initial values can be set in the Model.initial_values
dictionary directly.pm.Distribution(testval=...)
and must be assigned manually.Transform.forward
and Transform.backward
signatures changed.pm.DensityDist
no longer accepts the logp
as its first position argument. It is now an optional keyword argument. If you pass a callable as the first positional argument, a TypeError
will be raised (see 5026).pm.DensityDist
now accepts distribution parameters as positional arguments. Passing them as a dictionary in the observed
keyword argument is no longer supported and will raise an error (see 5026).logp
and random
functions that can be passed into a pm.DensityDist
has been changed (see 5026).v3
.3.11.0
(2021-01).v4
(preferably with informative errors).All of the above apply to:
pm.sample(return_inferencedata=True)
is now the default (see #4744).plots
and stats
wrappers were removed. The functions are now just available by their original names (see #4549 and 3.11.2
release notes).pm.sample_posterior_predictive(vars=...)
kwarg was removed in favor of var_names
(see #4343).ElemwiseCategorical
step method was removed (see #4701)v4
and has a deprecation warning.v3
already.This includes API changes we did not warn about since at least 3.11.0
(2021-01).
pm.Distribution(testval=...)
is now pm.Distribution(initval=...)
.dims
in the model is now tracked symbolically through Model.dim_lengths
(see #4625).CAR
distribution has been added to allow for use of conditional autoregressions which often are used in spatial and network models.shape
, dims
or size
(see #4696):
shape
the length of dimensions must be given numerically or as scalar Aesara Variables
. Numeric entries in shape
restrict the model variable to the exact length and re-sizing is no longer possible.dims
keeps model variables re-sizeable (for example through pm.Data
) and leads to well defined coordinates in InferenceData
objects.size
kwarg behaves like it does in Aesara/NumPy. For univariate RVs it is the same as shape
, but for multivariate RVs it depends on how the RV implements broadcasting to dimensionality greater than RVOp.ndim_supp
.Ellipsis
(...
) in the last position of shape
or dims
can be used as short-hand notation for implied dimensions.logcdf
method to Kumaraswamy distribution (see #4706).OrderedMultinomial
distribution has been added for use on ordinal data which are aggregated by trial, like multinomial observations, whereas OrderedLogistic
only accepts ordinal data in a disaggregated format, like categoricalPolya-Gamma
distribution has been added (see #4531). To make use of this distribution, the polyagamma>=1.3.1
library must be installed and available in the user's environment.pm.DensityDist
can now accept an optional logcdf
keyword argument to pass in a function to compute the cummulative density function of the distribution (see 5026).pm.DensityDist
can now accept an optional get_moment
keyword argument to pass in a function to compute the moment of the distribution (see 5026).>= 1.4.1
(see 4857).Uniform
and DiscreteUniform
no longer depends on pymc.distributions.dist_math.bound
for proper evaluation (see #4541).cloudpickle
as a required dependency, and no longer depend on dill
(see #4858).incomplete_beta
function in pymc.distributions.dist_math
was replaced by aesara.tensor.betainc
(see 4857).math.log1mexp
and math.log1mexp_numpy
will expect negative inputs in the future. A FutureWarning
is now raised unless negative_input=True
is set (see #4860).Lognormal
distribution to LogNormal
to harmonize CamelCase usage for distribution names.