Skip to content

Releases: pymc-devs/pymc

v4.1.5

17 Aug 12:14
Compare
Choose a tag to compare

What's Changed

New Features & Bugfixes 🎉

Docs & Maintenance 🔧

New Contributors

Full Changelog: v4.1.4...v4.1.5

v4.1.4

26 Jul 16:21
Compare
Choose a tag to compare

What's Changed

Docs & Maintenance 🔧

New Contributors

Full Changelog: v4.1.3...v4.1.4

v4.1.3

15 Jul 10:37
Compare
Choose a tag to compare

What's Changed

Docs & Maintenance 🔧

  • update docstrings in BetaBinomial class by @saurbhc in #5960
  • Deprecate assert_negative_support by @vitaliset in #5963
  • Updated docstrings to inform users that ODE solution may be slow. by @dmburt in #5965
  • Add docker-image workflow by @symeneses in #5966
  • ⬆️ UPGRADE: Autoupdate pre-commit config by @twiecki in #5967
  • Provide a fix for sample_blackjax_nuts failing with chains=1 with prior parameters of different shapes by @bherwerth in #5969
  • correct docstring in BetaBinomial Class by @SangamSwadiK in #5957
  • Correct docs for Bernoulli, Poisson, Negative Binomial, Geometric and HyperGeometric by @SangamSwadiK in #5958
  • update docstrings in ZeroInflatedPoisson, DiracDelta and OrderedLogistic classes by @saurbhc in #5962
  • Bernoulli, OrderedProbit, ZeroInflatedBinomial, ZeroInflatedNegativeBinomial docstring update by @mariyayb in #5961
  • Updated docstring for find_constrained_prior by @jlindbloom in #5964
  • Point installation links to new installation guide in docs by @fonnesbeck in #5873
  • Bump aesara dependency by @keesterbrugge in #5970

New Contributors

Full Changelog: v4.1.2...v4.1.3

v4.1.2

08 Jul 10:59
Compare
Choose a tag to compare

What's Changed

New Features & Bugfixes 🎉

  • Fix model graph node name to remove RV from end only and not the start by @cscheffler in #5953
  • Workaround to suppress (some) import warnings from NumPy by @michaelosthege in #5956

Docs & Maintenance 🔧

New Contributors

Full Changelog: v4.1.1...v4.1.2

v4.1.1

04 Jul 15:48
Compare
Choose a tag to compare

What's Changed

Docs & Maintenance 🔧

Full Changelog: v4.1.0...v4.1.1

v4.1.0

03 Jul 18:19
Compare
Choose a tag to compare

What's Changed

Major Changes 🛠

New Features & Bugfixes 🎉

  • Small improvements to early NUTS behaviour by @aseyboldt in #5824
  • Correct the order of rvs sent to compile_dlogp in find_MAP by @quantheory in #5928
  • Remove nan_is_num and nan_is_high limiters from find_MAP. by @quantheory in #5929
  • Registering _as_tensor_variable converter for pandas objects by @juanitorduz in #5920
  • Fix model and aesara_config kwargs for pm.Model by @ferrine in #5915

Docs & Maintenance 🔧

New Contributors

Full Changelog: v4.0.1...v4.1.0

v4.0.1

20 Jun 12:53
Compare
Choose a tag to compare

What's Changed

Docs

Bugfixes & Maintenance

  • Align advertised Metropolis.stats_dtypes with changes from 1e7d91f by @michaelosthege in #5882
  • Added a check in Empirical approximation which does not yet support InferenceData inputs (see #5884) by @ferrine in #5874
  • Compute some basic Slice sample stats by @ricardoV94 in #5889
  • Fixed bug when sampling discrete variables with SMC by @ricardoV94 in #5887
  • Removed t suffix from functions, Model methods and properties by @cuchoi in #5863
    • Model.logptModel.logp
    • Model.dlogptModel.dlogp
    • Model.d2logptModel.d2logp
    • Model.datalogptModel.datalogp
    • Model.varlogptModel.varlogp
    • Model.observedlogptModel.observedlogp
    • Model.potentiallogptModel.potentiallogp
    • Model.varlogp_nojactModel.varlogp_nojac
    • logprob.joint_logptlogprob.joint_logp
  • Remove self-directing arrow in observed nodes by @larryshamalama in #5893
  • Update clone_replace strict keyword name by @brandonwillard in #5849
  • Renamed pm.Constant to pm.DiracDelta by @cluhmann in #5903
  • Update Dockerfile to PyMC v4 by @danhphan in #5881
  • Refactor sampling_jax postrocessing to avoid jit by @ferrine in #5908
  • Fix compile_fn bug and reduce return type confusion by @michaelosthege in #5909
  • Align conda envs and add Windows 3.9 env by @hectormz in #5895
  • Include ConstantData in InferenceData returned by JAX samplers by @danhphan in #5807
  • Updated Aesara dependency to 2.7.3 by @ricardoV94 in #5910

New Contributors

Full Changelog: v4.0.0...v4.0.1

PyMC 4.0.0

03 Jun 15:55
Compare
Choose a tag to compare

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 🍾

Do not miss 🚨

  • ⚠️ The project was renamed to "PyMC". Now the library is installed as "pip install pymc" and imported like import pymc as pm. See this migration guide for more details.
  • ⚠️ Theano-PyMC has been replaced with Aesara, so all external references to theano and tt need to be replaced with aesara and at, respectively (see 4471).
  • ⚠️ Support for JAX and JAX samplers, also allows sampling on GPUs. This benchmark shows speed-ups of up to 11x.
  • ⚠️ The GLM submodule was removed, please use Bambi instead.
  • ⚠️ PyMC now requires SciPy version >= 1.4.1 (see #4857).

v3 features not yet working in v4 ⏳

⚠️ We plan to get these working again, but at this point their inner workings have not been refactored.

  • MvNormalRandomWalk, MvStudentTRandomWalk, GARCH11 and EulerMaruyama distributions (see #4642)
  • Nested Mixture distributions (see #5533)
  • pm.sample_posterior_predictive_w (see #4807)
  • Partially observed Multivariate distributions (see #5260)

New features 🥳

  • 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:

    • The dimensionality of model variables can now be parametrized through either of shape or dims (see #4696):
      • With 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.
      • An Ellipsis (...) in the last position of shape or dims can be used as short-hand notation for implied dimensions.
    • New features for pm.Data containers:
      • With 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().
      • New named dimensions can be introduced to the model via 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.
    • The length of dims in the model is now tracked symbolically through Model.dim_lengths (see #4625).
  • Sampling:

    • ⚠️ Random seeding behavior changed (see #5787)!
      • Sampling results will differ from those of v3 when passing the same random_seed as before. They will be consistent across subsequent v4 releases unless mentioned otherwise.
      • Sampling functions no longer respect user-specified global seeding! Always pass random_seed to ensure reproducible behavior.
      • random_seed now accepts RandomState and Generators besides integers.
    • A small change to the mass matrix tuning methods jitter+adapt_diag (the default) and adapt_diag improves performance early on during tuning for some models. #5004
    • New experimental mass matrix tuning method jitter+adapt_diag_grad. #5004
    • Support for samplers written in JAX:
      • Adding support for numpyro's NUTS sampler via pymc.sampling_jax.sample_numpyro_nuts()
      • Adding support for blackjax's NUTS sampler via 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)
      • Adding support for pm.Deterministic in pymc.sampling_jax (see #5182)
  • Miscellaneous:

    • The new 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.
    • Nested models now inherit the parent model's coordinates. #5344
    • softmax and log_softmax functions added to math module (see #5279).
    • Added the low level compile_forward_sampling_function method to compile the aesara function responsible for generating forward samples (see #5759).

Expected breaking changes 💔

  • pm.sample(return_inferencedata=True) is now the default (see #4744).
  • ArviZ 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)
  • Alternative 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.

Unexpected breaking changes (action needed) 😲

Very important ⚠️

  • 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).
  • BART has received various updates (5091, 5177, 5229, 4914) but was removed from the main package in #5566. It is now available from pymc-experimental.
  • Removed AR1. AR of order 1 should be used instead. (see 5734).
  • The 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.genera...
Read more

4.0.0 beta 6

30 Mar 11:39
c22ea96
Compare
Choose a tag to compare
4.0.0 beta 6 Pre-release
Pre-release

What's Changed

Full Changelog: v4.0.0b5...v4.0.0b6

4.0.0 beta 5

22 Mar 09:52
Compare
Choose a tag to compare
4.0.0 beta 5 Pre-release
Pre-release

What's Changed

Full Changelog: v4.0.0b4...v4.0.0b5