What's Changed
See the announcement post for an overview of what's new in PyMC 6.0.
Major Changes 🛠
- Depend on PyTensor 3.0 major release by @ricardoV94 in #8199
- Default backend is now numba
- set
pytensor.config.linker = "cvm"to return to the old default.
- set
- Several imports have changed location and already deprecated functions were removed
- Low level changes that shouldn't impact most users:
- Autodiff L_op and R_op methods are now deprecated in favor of pull_back and push_forward
test_valuemachinery is deprecated- low-level random API changed
- Default backend is now numba
- PyMC is now safely
pip install-able - Make nutpie the default nuts sampler (if installed) by @ricardoV94 in #8248
pip install pymc[nutpie]is now available
- Use arviz 1.0 by @aloctavodia in #8019
- arviz.InferenceData replaced by xarray.DataTree
- plot_trace replaced by plot_trace_dist (although plot_rank_dist is recommended instead)
- default credible interval changed from 0.94 highest-density interval to 0.89 equal-tailed interval
- InferenceData.extend replaced by DataTree.update
- See the full migration guide for more details
- Allow samplers to choose default number of tuning steps by @ricardoV94 in #8289
- Default pymc nuts sampler remains at 1000 tuning steps. Nutpie defaults to 400. Set tune explicitly to control it.
- Change
sample_posterior_predictiveAPI wrt to volatility by @ricardoV94 in #8209- Introduce
sample_varsandfreeze_varsargument to explicitly control which variables are resampled and which are reused from trace - Variables that are deemed "volatile" because they depend on data that has changed or variables being sampled will issue a warning instead of being resampled by default. Users should assign these variables to either
sample_varsorfreeze_varsto suppress the warning. var_nameshas no effect on sampling semantics and only controls what variables are saved in the trace.- See docstrings for detailed examples.
- Introduce
- Remove deprecated samples argument in sample_prior_predictive by @williambdean in #8204
- Remove experimental warning from dims module by @ricardoV94 in #8137
- Remove several functions and objects from PyMC root namespace by @ricardoV94 in #6973
New Features 🎉
- Richer textual representation: show Data variables, fold constants, and use semantic separators by @drbenvincent in #8205
- Add Model.table() method by @fonnesbeck in #8254
- Implement correct unconstraining transform for LKJCorr by @johncant in #7380
- Implement unconstraining transform for Wishart by @ricardoV94 in #8246
- Add logccdf to LogNormal distribution by @vybhav72954 in #8166
- Apply PyMC brand theme to Model.display mermaid diagram by @williambdean in #8294
Bugfixes 🪲
- Validate coordinate and variables don't have the same names by @Chirag3841 in #8093
Documentation 📖
- compile_pymc -> compile by @williambdean in #8168
- docs: fix RST in Model.debug docstring numbered list by @anevolbap in #8281
- Updated pymc overview notebook to v6 by @fonnesbeck in #8284
- Improve HalfFlat class docstring by @KRYSTALM7 in #8211
Maintenance 🔧
- Support blackjax 1.5 progress bars by @zaxtax in #8241
- VI Approximation's sample method uses model contexts by @zaxtax in #7940
- Reject variable names with
/(#8256) by @ricardoV94 in #8261 - Log external sampler and variables by @ricardoV94 in #8275
- Speedup PyMC import by @ricardoV94 in #8276
compute_log_prior: make subsequent arguments keyword only by @vkverma9534 in #8123
New Contributors
- @vkverma9534 made their first contribution in #8123
- @drbenvincent made their first contribution in #8205
- @vybhav72954 made their first contribution in #8166
- @johncant made their first contribution in #7380
- @KRYSTALM7 made their first contribution in #8211
- @MukundaKatta made their first contribution in #8251
- @anevolbap made their first contribution in #8281
Full Changelog: v5.28.0...v6.0.0