NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
PyPI · #2863 most downloaded on PyPI
Probabilistic Programming in Python: Bayesian Modeling and Probabilistic Machine Learning with PyTensor
Last release 10 days ago
08 Sep 2026
Ships fairly regularly
a new release about every 4 weeks
Nearly every release is documented
notes for 60 of the last 60 stable releases
1 version withdrawn
withdrawn after publishing
18 years old
105 releases · first in 2009
<!-- Release notes generated using configuration in .github/release.yml at main -->
<!-- Release notes generated using configuration in .github/release.yml at main -->
SymbolicRandomVariables inside CustomDist by @ricardoV94 in https://github.com/pymc-devs/pymc/pull/6805Full Changelog: https://github.com/pymc-devs/pymc/compare/v5.5.0...v5.6.0
One column per quarter.
<!-- Release notes generated using configuration in .github/release.yml at main -->
<!-- Release notes generated using configuration in .github/release.yml at main -->
Full Changelog: https://github.com/pymc-devs/pymc/compare/v5.4.1...v5.5.0
<!-- Release notes generated using configuration in .github/release.yml at main -->
<!-- Release notes generated using configuration in .github/release.yml at main -->
mode="FAST_COMPILE" by @ricardoV94 in https://github.com/pymc-devs/pymc/pull/6735get_vars_in_point_list by @ricardoV94 in https://github.com/pymc-devs/pymc/pull/6741sample overload by @thomasaarholt in https://github.com/pymc-devs/pymc/pull/6743Full Changelog: https://github.com/pymc-devs/pymc/compare/v5.4.0...v5.4.1
<!-- Release notes generated using configuration in .github/release.yml at main -->
<!-- Release notes generated using configuration in .github/release.yml at main -->
pymc to module name by @pdb5627 in https://github.com/pymc-devs/pymc/pull/6712not operations by @shreyas3156 in https://github.com/pymc-devs/pymc/pull/6689CustomDist by @ricardoV94 in https://github.com/pymc-devs/pymc/pull/6696_replace_rvs_in_graphs and fix bug when replacing input by @ricardoV94 in https://github.com/pymc-devs/pymc/pull/6720return_inferencedata in sample by @thomasaarholt in https://github.com/pymc-devs/pymc/pull/6709joint_logprob function from tests.logprob.utils by @shreyas3156 in https://github.com/pymc-devs/pymc/pull/6650Full Changelog: https://github.com/pymc-devs/pymc/compare/v5.3.1...v5.4.0
<!-- Release notes generated using configuration in .github/release.yml at main -->
<!-- Release notes generated using configuration in .github/release.yml at main -->
< and > operations by @shreyas3156 in https://github.com/pymc-devs/pymc/pull/6662>= and <= operations by @shreyas3156 in https://github.com/pymc-devs/pymc/pull/6680WhiteNoise Covariance bug by @dehorsley in https://github.com/pymc-devs/pymc/pull/6674CustomDist and Simulator no longer require class_name when creating a dist by @ricardoV94 in https://github.com/pymc-devs/pymc/pull/6668set_data by @Dhruvanshu-Joshi in https://github.com/pymc-devs/pymc/pull/6676Full Changelog: https://github.com/pymc-devs/pymc/compare/v5.3.0...v5.3.1
<!-- Release notes generated using configuration in .github/release.yml at main -->
<!-- Release notes generated using configuration in .github/release.yml at main -->
x ~ N(0, 1) -> x ~ Normal(0, 1)Model.debug() helper by @ricardoV94 in https://github.com/pymc-devs/pymc/pull/6634unnamed_distribution to glossary by @alporter08 in https://github.com/pymc-devs/pymc/pull/6638Full Changelog: https://github.com/pymc-devs/pymc/compare/v5.2.0...v5.3.0
<!-- Release notes generated using configuration in .github/release.yml at main -->
<!-- Release notes generated using configuration in .github/release.yml at main -->
logprob/joint_logp to logprob/basic and move logcdf and icdf functions there by @ricardoV94 in https://github.com/pymc-devs/pymc/pull/6599IfElse graphs by @ricardoV94 in https://github.com/pymc-devs/pymc/pull/6529Beta distribution by @JoKeyser in https://github.com/pymc-devs/pymc/pull/6604OrderedLogistic by @NathanielF in https://github.com/pymc-devs/pymc/pull/6611sample_posterior_predictive by @fonnesbeck in https://github.com/pymc-devs/pymc/pull/6616at aliases to pt by @shreyas3156 in https://github.com/pymc-devs/pymc/pull/6577auto argument from pm.Deterministic docstring by @shreyas3156 in https://github.com/pymc-devs/pymc/pull/6592collect_default_updates by @ricardoV94 in https://github.com/pymc-devs/pymc/pull/6620Full Changelog: https://github.com/pymc-devs/pymc/compare/v5.1.2...v5.2.0
<!-- Release notes generated using configuration in .github/release.yml at main -->
<!-- Release notes generated using configuration in .github/release.yml at main -->
Potential and Deterministic by @Raj-Parekh24 in https://github.com/pymc-devs/pymc/pull/6576nuts_sampler_kwargs and nuts_kwargs to sample by @fonnesbeck in https://github.com/pymc-devs/pymc/pull/6581check_icdf helper to test icdf implementations by @ricardoV94 in https://github.com/pymc-devs/pymc/pull/6583warn_treedepth looking at the wrong stat by @michaelosthege in https://github.com/pymc-devs/pymc/pull/6591Potential docstring by @chriswmann in https://github.com/pymc-devs/pymc/pull/6575ZeroInflatedNegBinomial by @aleicazatti in https://github.com/pymc-devs/pymc/pull/6585Full Changelog: https://github.com/pymc-devs/pymc/compare/v5.1.1...v5.1.2
While this release carries a minor-version number increase, it is actually a major release (5.1). 5.1.0 was skipped due to a packaging issue.
While this release carries a minor-version number increase, it is actually a major release (5.1). 5.1.0 was skipped due to a packaging issue.
nutpie, blackjax, numpyro) with new sample() kwarg called nuts_sampler which often provide huge speed-ups and improved convergence by @twiecki and @ricardoV94 in https://github.com/pymc-devs/pymc/pull/6422dims elements to be strings by @ricardoV94 in https://github.com/pymc-devs/pymc/pull/6470CustomDist for functions that return symbolic representations by @ricardoV94 in https://github.com/pymc-devs/pymc/pull/6462testing module by @ricardoV94 in https://github.com/pymc-devs/pymc/pull/6571SamplerReport by @michaelosthege in https://github.com/pymc-devs/pymc/pull/6453rv_type defined by @ricardoV94 in https://github.com/pymc-devs/pymc/pull/6493IBaseTrace interfaces by @michaelosthege in https://github.com/pymc-devs/pymc/pull/6475zerosum_axes to n_zerosum_axes by @michaelraczycki in https://github.com/pymc-devs/pymc/pull/6522TruncatedNormal only accepts mu and sigma as non keyword arguments by @michaelraczycki in https://github.com/pymc-devs/pymc/pull/6568Full Changelog: https://github.com/pymc-devs/pymc/compare/v5.0.2...v5.1.1<!-- Release notes generated using configuration in .github/release.yml at v5.1.1 -->
<!-- Release notes generated using configuration in .github/release.yml at v5.1.0 -->
<!-- Release notes generated using configuration in .github/release.yml at v5.1.0 -->
This release was skipped due to a packaging problem.
<!-- Release notes generated using configuration in .github/release.yml at v5.0.2 -->
<!-- Release notes generated using configuration in .github/release.yml at v5.0.2 -->
add_values/remove_values to fix backend type issues by @michaelosthege in https://github.com/pymc-devs/pymc/pull/6451Full Changelog: https://github.com/pymc-devs/pymc/compare/v5.0.1...v5.0.2
<!-- Release notes generated using configuration in .github/release.yml at v5.0.1 -->
<!-- Release notes generated using configuration in .github/release.yml at v5.0.1 -->
Full Changelog: https://github.com/pymc-devs/pymc/compare/v5.0.0...v5.0.1
Fix ordering transformation for batched dimensions, and deprecate in favor of univariate_ordered and multivariate_ordered by @TimOliverMaier in #6255…
<!-- Release notes generated using configuration in .github/release.yml at main -->
In this major release we are switching our graph computation backend from Aesara to PyTensor, which is a fork of Aesara under PyMC governance. Read the full announcement here: PyMC is Forking Aesara to PyTensor.
The switch itself should be rather seamless and you can probably just update your imports:
import aesara.tensor as at # old (pymc >=4,< 5)
import pytensor.tensor as pt # new (pymc >=5)
If you encounter problems updating please check the latest Discussions and don't hesitate to get in touch.
logprob submodule. Dispatch methods can be found in logprob.abstractarviz.compare is no longer computed by default. It can be added with idata = pm.compute_log_likelihood(idata) or using pm.sample(idata_kwargs=dict(log_likelihood=True)) by @ricardoV94 in https://github.com/pymc-devs/pymc/pull/6374Minibatch API by @ferrine in https://github.com/pymc-devs/pymc/pull/6304univariate_ordered and multivariate_ordered by @TimOliverMaier in #6255 and @ricardoV94 in https://github.com/pymc-devs/pymc/pull/6375DensityDist when random function returns a PyTensor variable by @ricardoV94 in https://github.com/pymc-devs/pymc/pull/6361AsymmetricLaplace by @aloctavodia in https://github.com/pymc-devs/pymc/pull/6337dims by @michaelosthege in https://github.com/pymc-devs/pymc/pull/6339GOVERNANCE.md by @canyon289 in https://github.com/pymc-devs/pymc/pull/6358mp_ctx strings to pm.sample() on M1 MacOS by @digicosmos86 in https://github.com/pymc-devs/pymc/pull/6363Scan values by @ricardoV94 in https://github.com/pymc-devs/pymc/pull/6343run_mypy.py from pass-listing to fail-listing by @michaelosthege in https://github.com/pymc-devs/pymc/pull/6381pydocstyle in pre-commit by @michaelosthege in https://github.com/pymc-devs/pymc/pull/6382NoDistribution from docs by @stestoll in https://github.com/pymc-devs/pymc/pull/6316Full Changelog: https://github.com/pymc-devs/pymc/compare/v4.4.0...v5.0.0
Deprecated accessing any of [value_variable|observations|transform|total_size] via var.tag in favor of model.rvs_to_[values|transforms|total_sizes]
<!-- Release notes generated using configuration in .github/release.yml at main -->
pm.sample(trace=[...]). by @michaelosthege in https://github.com/pymc-devs/pymc/pull/6269[value_variable|observations|transform|total_size] via var.tag in favor of model.rvs_to_[values|transforms|total_sizes]joint_logp in favor of model.logpaesaraf.rvs_to_value_vars in favor of model.replace_rvs_by_valuesseed for initial point no longer supported by @wd60622 in https://github.com/pymc-devs/pymc/pull/6291step/astep method.BlockedStep.generates_stats attribute was removed.graph_model node types based on variable Op class by @ricardoV94 in https://github.com/pymc-devs/pymc/pull/6259sampling.py into sampling.py and sampling_forward.py by @michaelosthege in https://github.com/pymc-devs/pymc/pull/6257join_nonshared_inputs documentation by @wd60622 in https://github.com/pymc-devs/pymc/pull/6216Full Changelog: https://github.com/pymc-devs/pymc/compare/v4.3.0...v4.4.0
Deprecate old or unused Model methods by @ricardoV94 in https://github.com/pymc-devs/pymc/pull/6237
<!-- Release notes generated using configuration in .github/release.yml at main -->
samples and keep_size from sample_posterior_predictive by @pibieta in https://github.com/pymc-devs/pymc/pull/6029Model methods by @ricardoV94 in https://github.com/pymc-devs/pymc/pull/6237EulerMaruyama to work in v4 by @junpenglao in https://github.com/pymc-devs/pymc/pull/6227get_vars_in_point_list when model does not have variables that exist in the trace by @lucianopaz in https://github.com/pymc-devs/pymc/pull/6203"fork" for MacOs ARM devices by @bchen93 in https://github.com/pymc-devs/pymc/pull/6218sample_posterior_predictive_w by @zaxtax in https://github.com/pymc-devs/pymc/pull/6254logo_link to work with new sphinx schema by @hdnl in https://github.com/pymc-devs/pymc/pull/6209ZeroInflatedPoisson distribution by @cscheffler in https://github.com/pymc-devs/pymc/pull/6213debug_print of wrong variable in notebook by @ricardoV94 in https://github.com/pymc-devs/pymc/pull/6225TestMixture.test_component_choice_random by @bherwerth in https://github.com/pymc-devs/pymc/pull/6222TestSamplePPC.test_normal_scalar by @mattiadg in https://github.com/pymc-devs/pymc/pull/6220TestTruncation.truncation_discrete_random by @mattiadg in https://github.com/pymc-devs/pymc/pull/6229BaseSampler(SeededTest) to make deriving test classes deterministic by @mattiadg in https://github.com/pymc-devs/pymc/pull/6251Full Changelog: https://github.com/pymc-devs/pymc/compare/v4.2.2...v4.3.0
<!-- Release notes generated using configuration in .github/release.yml at main -->
<!-- Release notes generated using configuration in .github/release.yml at main -->
ZeroSumNormal distribution by @AlexAndorra in https://github.com/pymc-devs/pymc/pull/6121RandomWalk distributions by @ricardoV94 in https://github.com/pymc-devs/pymc/pull/6131set_data and Data by @bwengals in https://github.com/pymc-devs/pymc/pull/6087Full Changelog: https://github.com/pymc-devs/pymc/compare/v4.2.1...v4.2.2
<!-- Release notes generated using configuration in .github/release.yml at main -->
<!-- Release notes generated using configuration in .github/release.yml at main -->
DiscreteUniformRV dropping degenerate dimension by @ricardoV94 in https://github.com/pymc-devs/pymc/pull/6151Truncated by @ricardoV94 in https://github.com/pymc-devs/pymc/pull/6165Interpolated and add an example for Deterministic by @Armavica in https://github.com/pymc-devs/pymc/pull/6126constant_fold helper by @ricardoV94 in https://github.com/pymc-devs/pymc/pull/6160sigma instead of noise in GP functions 6094 by @wd60622 in https://github.com/pymc-devs/pymc/pull/6145sample_smc by @aloctavodia in https://github.com/pymc-devs/pymc/pull/6162default_output is the only measurable output in SymbolicRandomVariables by @ricardoV94 in https://github.com/pymc-devs/pymc/pull/6161Full Changelog: https://github.com/pymc-devs/pymc/compare/v4.2.0...v4.2.1
<!-- Release notes generated using configuration in .github/release.yml at main -->
<!-- Release notes generated using configuration in .github/release.yml at main -->
GARCH11 to v4 by @junpenglao in https://github.com/pymc-devs/pymc/pull/6119alpha in StickBreakingWeights by @purna135 in https://github.com/pymc-devs/pymc/pull/6042NoDistribution and enable .dist API for Simulator and DensityDist by @ricardoV94 in https://github.com/pymc-devs/pymc/pull/6110start_sigma to ADVI 2 by @markusschmaus in https://github.com/pymc-devs/pymc/pull/6132rvs_to_values work with non-RandomVariables by @ricardoV94 in https://github.com/pymc-devs/pymc/pull/6101Marginalapprox by @bwengals in https://github.com/pymc-devs/pymc/pull/6076TruncatedNormal returns -inf for all values if any value is out of bounds by @adrn in https://github.com/pymc-devs/pymc/pull/6128cov_func/cov to scale_func/scale for TP/MvStudentT by @fonnesbeck in https://github.com/pymc-devs/pymc/pull/6068SpecifyShape when converting to JAX by @martiningram in https://github.com/pymc-devs/pymc/pull/6062reshape_t by @tjburch in https://github.com/pymc-devs/pymc/pull/6118Model docstring by @alekracicot in https://github.com/pymc-devs/pymc/pull/6048AR distribution parameters by @daniel-saunders-phil in https://github.com/pymc-devs/pymc/pull/6080NormalMixture docstring by @MatthewQuenneville in https://github.com/pymc-devs/pymc/pull/6073Full Changelog: https://github.com/pymc-devs/pymc/compare/v4.1.7...v4.2.0
<!-- Release notes generated using configuration in .github/release.yml at v4.1.7 -->
<!-- Release notes generated using configuration in .github/release.yml at v4.1.7 -->
Full Changelog: https://github.com/pymc-devs/pymc/compare/v4.1.6...v4.1.7
<!-- Release notes generated using configuration in .github/release.yml at v4.1.6 -->
<!-- Release notes generated using configuration in .github/release.yml at v4.1.6 -->
Full Changelog: https://github.com/pymc-devs/pymc/compare/v4.1.5...v4.1.6
Removed assert_negative_support deprecated function call #5997 by @dihanster in https://github.com/pymc-devs/pymc/pull/6034
<!-- Release notes generated using configuration in .github/release.yml at v4.1.5 -->
dprint error by @juanitorduz in https://github.com/pymc-devs/pymc/pull/6030assert_negative_support deprecated function call #5997 by @dihanster in https://github.com/pymc-devs/pymc/pull/6034Full Changelog: https://github.com/pymc-devs/pymc/compare/v4.1.4...v4.1.5
<!-- Release notes generated using configuration in .github/release.yml at v4.1.4 -->
<!-- Release notes generated using configuration in .github/release.yml at v4.1.4 -->
coords and dims in sampling_jax by @bherwerth in https://github.com/pymc-devs/pymc/pull/5983MLDA to pymc-experimental by @michaelosthege in https://github.com/pymc-devs/pymc/pull/6007pm.Interpolated moment by @larryshamalama in https://github.com/pymc-devs/pymc/pull/5986dtype casting in pm.model_to_graphviz by @larryshamalama in https://github.com/pymc-devs/pymc/pull/6011Full Changelog: https://github.com/pymc-devs/pymc/compare/v4.1.3...v4.1.4
Deprecate assert_negative_support by @vitaliset in https://github.com/pymc-devs/pymc/pull/5963
<!-- Release notes generated using configuration in .github/release.yml at v4.1.3 -->
assert_negative_support by @vitaliset in https://github.com/pymc-devs/pymc/pull/5963sample_blackjax_nuts failing with chains=1 with prior parameters of different shapes by @bherwerth in https://github.com/pymc-devs/pymc/pull/5969Full Changelog: https://github.com/pymc-devs/pymc/compare/v4.1.2...v4.1.3
<!-- Release notes generated using configuration in .github/release.yml at v4.1.2 -->
<!-- Release notes generated using configuration in .github/release.yml at v4.1.2 -->
Full Changelog: https://github.com/pymc-devs/pymc/compare/v4.1.1...v4.1.2
<!-- Release notes generated using configuration in .github/release.yml at v4.1.1 -->
<!-- Release notes generated using configuration in .github/release.yml at v4.1.1 -->
Full Changelog: https://github.com/pymc-devs/pymc/compare/v4.1.0...v4.1.1
Deprecating MLDA in anticipation of migrating it to `pymc-experimental` by @michaelosthege in https://github.com/pymc-devs/pymc/pull/5944
pm.Data(mutable=False) by @michaelosthege in https://github.com/pymc-devs/pymc/pull/5944MLDA in anticipation of migrating it to pymc-experimental by @michaelosthege in https://github.com/pymc-devs/pymc/pull/5944rvs sent to compile_dlogp in find_MAP by @quantheory in https://github.com/pymc-devs/pymc/pull/5928nan_is_num and nan_is_high limiters from find_MAP. by @quantheory in https://github.com/pymc-devs/pymc/pull/5929_as_tensor_variable converter for pandas objects by @juanitorduz in https://github.com/pymc-devs/pymc/pull/5920model and aesara_config kwargs for pm.Model by @ferrine in https://github.com/pymc-devs/pymc/pull/5915Full Changelog: https://github.com/pymc-devs/pymc/compare/v4.0.1...v4.1.0
PyMC, Aesara and Aeppl intro notebook by @juanitorduz in https://github.com/pymc-devs/pymc/pull/5721
rng_seeder to random_seed in 'Prior and Posterior Predictive Checks' notebook by @hectormz in https://github.com/pymc-devs/pymc/pull/5896Metropolis.stats_dtypes with changes from 1e7d91f by @michaelosthege in https://github.com/pymc-devs/pymc/pull/5882Empirical approximation which does not yet support InferenceData inputs (see #5884) by @ferrine in https://github.com/pymc-devs/pymc/pull/5874Slice sample stats by @ricardoV94 in https://github.com/pymc-devs/pymc/pull/5889t suffix from functions, Model methods and properties by @cuchoi in https://github.com/pymc-devs/pymc/pull/5863
Model.logpt → Model.logpModel.dlogpt → Model.dlogpModel.d2logpt → Model.d2logpModel.datalogpt → Model.datalogpModel.varlogpt → Model.varlogpModel.observedlogpt → Model.observedlogpModel.potentiallogpt → Model.potentiallogpModel.varlogp_nojact → Model.varlogp_nojaclogprob.joint_logpt → logprob.joint_logpclone_replace strict keyword name by @brandonwillard in https://github.com/pymc-devs/pymc/pull/5849pm.Constant to pm.DiracDelta by @cluhmann in https://github.com/pymc-devs/pymc/pull/5903Dockerfile to PyMC v4 by @danhphan in https://github.com/pymc-devs/pymc/pull/5881sampling_jax postrocessing to avoid jit by @ferrine in https://github.com/pymc-devs/pymc/pull/5908compile_fn bug and reduce return type confusion by @michaelosthege in https://github.com/pymc-devs/pymc/pull/5909ConstantData in InferenceData returned by JAX samplers by @danhphan in https://github.com/pymc-devs/pymc/pull/5807Full Changelog: https://github.com/pymc-devs/pymc/compare/v4.0.0...v4.0.1
The is_observed arguement for gp.Marginal* implementations has been deprecated.
If you want a description of the highlights of this release, check out the release announcement on our new website. Feel free to read it, print it out, and give it to people on the street -- because everybody has to know PyMC 4.0 is officially out 🍾
import pymc as pm. See this migration guide for more details.theano and tt need to be replaced with aesara and at, respectively (see 4471).>= 1.4.1 (see #4857).⚠️ We plan to get these working again, but at this point their inner workings have not been refactored.
pm.sample_posterior_predictive_w (see #4807)Distributions:
Univariate censored distributions are now available via pm.Censored. #5169
The CAR distribution has been added to allow for use of conditional autoregressions which often are used in spatial and network models.
Added a logcdf implementation for the Kumaraswamy distribution (see #4706).
The 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 categorical observations (see #4773).
The Polya-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 moment keyword argument to pass in a function to compute the moment of the distribution (see 5026).
Added an alternative parametrization, logit_p to pm.Binomial and pm.Categorical distributions (see 5637).
Model dimensions:
shape or dims (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.Ellipsis (...) in the last position of shape or dims can be used as short-hand notation for implied dimensions.pm.Data containers:
pm.Data(..., mutable=False), or by using pm.ConstantData() one can now create TensorConstant data variables. These can be more performant and compatible in situations where a variable doesn't need to be changed via pm.set_data(). See #5295. If you do need to change the variable, use pm.Data(..., mutable=True), or pm.MutableData().pm.Data(..., dims=...). For mutable data variables (see above) the lengths of these dimensions are symbolic, so they can be re-sized via pm.set_data().pm.Data now passes additional kwargs to aesara.shared/at.as_tensor. #5098.dims in the model is now tracked symbolically through Model.dim_lengths (see #4625).Sampling:
random_seed as before. They will be consistent across subsequent v4 releases unless mentioned otherwise.random_seed to ensure reproducible behavior.random_seed now accepts RandomState and Generators besides integers.pymc.sampling_jax.sample_numpyro_nuts()pymc.sampling_jax.sample_blackjax_nuts() (see #5477)pymc.sampling_jax samplers support log_likelihood, observed_data, and sample_stats in returned InferenceData object (see #5189)pm.Deterministic in pymc.sampling_jax (see #5182)Miscellaneous:
pm.find_constrained_prior function can be used to find optimized prior parameters of a distribution under some
constraints (e.g lower and upper bound). See #5231.softmax and log_softmax functions added to math module (see #5279).compile_forward_sampling_function method to compile the aesara function responsible for generating forward samples (see #5759).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)LKJCholeskyCov's compute_corr keyword argument is now set to True by default (see#5382)sd keyword argument has been removed from all distributions. sigma should be used instead (see #5583).Read on if you're a developer. Or curious. Or both.
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).AR1. AR of order 1 should be used instead. (see 5734).pm.EllipticalSlice sampler was removed (see #5756).BaseStochasticGradient was removed (see #5630)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(size=x) is now pm.draw(pm.Distribution(...), draws=x).pm.draw_values(...) and pm.generate_samples(...) were removed.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.Distribution(testval=...) is now pm.Distribution(initval=...).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.transforms module is no longer accessible at the root level. It is accessible at pymc.distributions.transforms (see#5347).logp, dlogp, and d2logp and nojac variations were removed. Use Model.compile_logp, compile_dlgop and compile_d2logp with jacobian keyword instead.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).Signature and default parameters changed for several distributions:
pm.StudentT now requires either sigma or lam as kwarg (see #5628)pm.StudentT now requires nu to be specified (no longer defaults to 1) (see #5628)pm.AsymmetricLaplace positional arguments re-ordered (see #5628)pm.AsymmetricLaplace now requires mu to be specified (no longer defaults to 0) (see #5628)ZeroInflatedPoisson theta parameter was renamed to mu (see #5584).pm.GaussianRandomWalk initial distribution defaults to zero-centered normal with sigma=100 instead of flat (see#5779)pm.AR initial distribution defaults to unit normal instead of flat (see#5779)logpt, logpt_sum, logp_elemwiset and nojac variations were removed. Use Model.logpt(jacobian=True/False, sum=True/False) instead.
dlogp_nojact and d2logp_nojact were removed. Use Model.dlogpt and d2logpt with jacobian=False instead.
model.makefn is now called Model.compile_fn, and model.fn was removed.
Methods starting with fast_*, such as Model.fast_logp, were removed. Same applies to PointFunc classes
Model(model=...) kwarg was removed
Model(theano_config=...) kwarg was removed
Model.size property was removed (use Model.ndim instead).
dims and coords handling:
Transform.forward and Transform.backward signatures changed.
Changes to the Gaussian Process (GP) submodule (see 5055):
gp.prior(..., shape=...) kwarg was renamed to size.gp.prior now require explicit kwargs.gp.Latent, gp.Marginal etc., cov_func and mean_func are required kwargs.mkl version is fixed to verison 2020.4, and mkl-service is fixed to 2.3.0. This was required for gp.MarginalKron to function properly.gp.MvStudentT uses rotated samples from StudentT directly now, instead of sampling from pm.Chi2 and then from pm.Normal.gp.util.stabilize.is_observed arguement for gp.Marginal* implementations has been deprecated.kmeans_inducing_points function now passes through kmeans_kwargs to scipy's k-means function.replace_with_values function has been added to gp.utils.MarginalSparse has been renamed MarginalApprox.Removed MixtureSameFamily. Mixture is now capable of handling batched multivariate components (see #5438).
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.p parameters in Categorical and Multinomial distributions (see #5370).Implemented default transform for Mixtures by @ricardoV94 in https://github.com/pymc-devs/pymc/pull/5636
compile_pymc by @ricardoV94 in https://github.com/pymc-devs/pymc/pull/5645Full Changelog: https://github.com/pymc-devs/pymc/compare/v4.0.0b5...v4.0.0b6
Generalize multinomial moment to arbitrary dimensions by @markvrma in https://github.com/pymc-devs/pymc/pull/5476
logp_transform to _get_default_transform by @ricardoV94 in https://github.com/pymc-devs/pymc/pull/5612Full Changelog: https://github.com/pymc-devs/pymc/compare/v4.0.0b4...v4.0.0b5
This release adds the following major improvements:
This release adds the following major improvements:
Full Changelog: https://github.com/pymc-devs/pymc/compare/v4.0.0b3...v4.0.0b4
Here is the full list of changes compared to `4.0.0b2`.
Here is the full list of changes compared to 4.0.0b2.
For a current list of changes w.r.t. the upcoming v3.11.5 see RELEASE-NOTES.md.
This beta release includes the removal of warnings, polishing of APIs, more distributions and internal refactorings.
This beta release includes the removal of warnings, polishing of APIs, more distributions and internal refactorings.
Here is the full list of changes compared to 4.0.0b1.
For a current list of changes w.r.t. the upcoming v3.11.5 see RELEASE-NOTES.md.
pm.Data(..., mutable=False/True) and corresponding pm.ConstantData/pm.MutableData wrappers (see #5295).theano or pymc3 being installed in parallel was removed.dims can again be specified alongside shape or size (see #5325).pm.draw was added to draw prior samples from a variable (see #5340).Model.logpt.4.0.0 is a rewrite of large parts of the PyMC code base which make it faster, adds many new features, and introduces some breaking changes. For the mo…
⚠ This is the first beta of the next major release for PyMC 4.0.0 (formerly PyMC3). 4.0.0 is a rewrite of large parts of the PyMC code base which make it faster, adds many new features, and introduces some breaking changes. For the most part, the API remains stable and we expect that most models will work without any changes.
We plan to get these working again, but at this point, their inner workings have not been refactored.
BaseStochasticGradient (see #5138)pm.sample_posterior_predictive_w (see #4807)Also, check out the milestones for a potentially more complete list.
v3.11.5.v4.0.0.All of the above applies to:
pip install pymc. (Use pip install pymc --pre while we are in the pre-release phase.)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 an 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 positional 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).gp) submodule:
gp.prior(..., shape=...) kwarg was renamed to size.gp.prior now require explicit kwargs.gp.Latent, gp.Marginal etc., cov_func and mean_func are required kwargs.mkl version is fixed to verison 2020.4, and mkl-service is fixed to 2.3.0. This was required for gp.MarginalKron to function properly.gp.MvStudentT uses rotated samples from StudentT directly now, instead of sampling from pm.Chi2 and then from pm.Normal.gp.util.stabilize.is_observed argument for gp.Marginal* implementations has been deprecated.kmeans_inducing_points function now passes through kmeans_kwargs to scipy's k-means function.replace_with_values function has been added to gp.utils.MarginalSparse has been renamed MarginalApprox.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 alreadydims 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 as 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 shorthand notation for implied dimensions.logcdf implementation for the 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 categorical
observations (see #4773).Polya-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).pm.Data now passes additional kwargs to aesara.shared. #5098>= 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.Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Your coding agent can read these notes before it upgrades. Set up the MCP server →