Releases: pymc-devs/pymc
v5.1.1
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.
What's Changed
Major Changes 🛠
- Access to external NUTS samplers (
nutpie
,blackjax
,numpyro
) with newsample()
kwarg callednuts_sampler
which often provide huge speed-ups and improved convergence by @twiecki and @ricardoV94 in #6422 - Enforce
dims
elements to be strings by @ricardoV94 in #6470 - Align DEMetropolis defaults with literature recommendations by @gbrunkhorst in #6488
- Tests are no longer part of the package by @Armavica in #6540
- Replace rvs_to_total_sizes mapping by MinibatchRandomVariables by @ricardoV94 in #6523
New Features 🎉
- Use separate argument in
CustomDist
for functions that return symbolic representations by @ricardoV94 in #6462 - Add nu parametrization to beta distribution by @alekracicot in #6344
- Preregister shapes of sampler stats by @michaelosthege in #6517
- Optional McBackend support by @michaelosthege in #6510
- Make VI (posterior) mean and std accessible as a structured xarray by @fonnesbeck in #6387
- Add mutable coords to Model by @Dhruvanshu-Joshi in #6515
- Allow Scan logprob inference of non-pure RandomVariable outputs by @ricardoV94 in #6578
- Public test utilities can now be found in
testing
module by @ricardoV94 in #6571
Bugfixes 🪲
- Fix bug in transformed scan variables by @ricardoV94 in #6573
Maintenance 🔧
- Fix some UserWarnings by @ricardoV94 in #6407
- Decouple convergence checking from
SamplerReport
by @michaelosthege in #6453 - Updated LICENSE to include AePPL license info by @fonnesbeck in #6474
- Fix typo in model comparison notebook by @Mikhail-Naumov in #6480
- Add devcontainer Docker image by @maresb in #6482
- Update GitPod base image to use pymc-built image by @maresb in #6483
- Register Op as subclass of Distributions with
rv_type
defined by @ricardoV94 in #6493 - Refactoring towards
IBaseTrace
interfaces by @michaelosthege in #6475 - Fix some type issues related to retrieving stats from traces by @michaelosthege in #6504
- Move pymc/distributions/logprob.py to pymc/logprob/ by @Armavica in #6441
- Update GLM_linear.ipynb by @bsenst in #6519
- Fix plot in HyperGeometric docstring by @aleicazatti in #6513
- Build docs in simplified environment by @michaelosthege in #6537
- BetaBinomial variance is not correctly described by @soma2000-lang in #6516
- Rename
zerosum_axes
ton_zerosum_axes
by @michaelraczycki in #6522 - issue #5791, dims & cords inference from xarray by @michaelraczycki in #6514
- Fix some code lints found with ruff by @Armavica in #6545
- Add check for variables in step samplers by @michaelraczycki in #6524
- Fix two typos in documentation by @JoKeyser in #6547
- Bump PyTensor dependency by @ricardoV94 in #6531
- Updated docstring for Potential function by @Dhruvanshu-Joshi in #6559
TruncatedNormal
only acceptsmu
andsigma
as non keyword arguments by @michaelraczycki in #6568- Exclude tests from package discovery by @Armavica in #6552
New Contributors
- @Mikhail-Naumov made their first contribution in #6480
- @gbrunkhorst made their first contribution in #6488
- @dependabot made their first contribution in #6490
- @bsenst made their first contribution in #6519
- @Dhruvanshu-Joshi made their first contribution in #6515
- @aleicazatti made their first contribution in #6513
- @michaelraczycki made their first contribution in #6522
- @JoKeyser made their first contribution in #6547
Full Changelog: v5.0.2...v5.1.1
v5.1.0
v5.0.2
What's Changed
Major Changes 🛠
- Bump PyTensor to 2.9.1 by @michaelosthege in #6431
- Remove
add_values
/remove_values
to fix backend type issues by @michaelosthege in #6451
New Features 🎉
- Infer logprob of absolute operations and fix logprob of powers with negative values by @LukeLB in #6414
Bugfixes 🪲
- Revert "Add informative error if user tries to use Aesara function with PyTensor variables by @ricardoV94 in #6440
- Fix bug that does not correctly set the dtype of determinsitic variab… by @jessegrabowski in #6425
Maintenance 🔧
- Inconsistent kwarg progressbar or progress_bar by @Gimmesoup in #6389
- Default VonMises kappa to 1.0 and fix math notation in doc by @wd60622 in #6419
- ModelGraph only stops ancestry check at model defined named_vars by @lucianopaz in #6426
- Add Matern12 covariance function to docs by @fonnesbeck in #6429
- Reference template notebook in Jupyter style guide by @reshamas in #6433
- Refactor internal sampling functions by @michaelosthege in #6444
- Refactoring and addition of helpers to handle flat stats by @michaelosthege in #6443
- Add seealso note to install docs by @OriolAbril in #6448
New Contributors
- @Gimmesoup made their first contribution in #6389
- @jessegrabowski made their first contribution in #6425
Full Changelog: v5.0.1...v5.0.2
v5.0.1
What's Changed
New Features 🎉
- Implement logp derivation for division, subtraction and negation by @ricardoV94 in #6371
- Extend logprob inference to power transforms by @ricardoV94 in #6400
Bugfixes 🐛
- Update PyTensor dependency and fix bugs in inferred mixture logprob by @ricardoV94 in #6397
Maintenance 🔧
- Update Release Notes template by @ricardoV94 in #6392
- Remove global RandomStream by @ricardoV94 in #6396
- Fix error in docstring of Truncated by @ricardoV94 in #6395
- added postprocessing_chunks option to sample_blackjax_nuts and sample… by @wnorcbrown in #6388
- replaces numpy sqrt method with pytensor equivalent by @morganstrom in #6405
New Contributors
- @wnorcbrown made their first contribution in #6388
Full Changelog: v5.0.0...v5.0.1
v5.0.0
What's Changed
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.
Major Changes 🛠
- ⚠ Switched the graph backend from Aesara to PyTensor
- Merged AePPL into a new
logprob
submodule. Dispatch methods can be found inlogprob.abstract
- ⚠ The log_likelihood, needed for
arviz.compare
is no longer computed by default. It can be added withidata = pm.compute_log_likelihood(idata)
or usingpm.sample(idata_kwargs=dict(log_likelihood=True))
by @ricardoV94 in #6374 - Changed
Minibatch
API by @ferrine in #6304 - Fix ordering transformation for batched dimensions, and deprecate in favor of
univariate_ordered
andmultivariate_ordered
by @TimOliverMaier in #6255 and @ricardoV94 in #6375
New Features & Bugfixes 🎉
- Support logp derivation in
DensityDist
whenrandom
function returns a PyTensor variable by @ricardoV94 in #6361 - Added alternative parametrization for
AsymmetricLaplace
by @aloctavodia in #6337
Docs & Maintenance 🔧
- Bugfixes to increase robustness against unnamed
dims
by @michaelosthege in #6339 - Updated
GOVERNANCE.md
by @canyon289 in #6358 - Fixed overriding user provided
mp_ctx
strings topm.sample()
on M1 MacOS by @digicosmos86 in #6363 - Simplify measurable transform rewrites by @ricardoV94 in #6370
- Fix measurable stack and join with interdependent inputs by @ricardoV94 in #6342
- Allow transforms to work with multiple-valued nodes by @ricardoV94 in #6341
- Fix transformed
Scan
values by @ricardoV94 in #6343 - Add issue templates by @ferrine in #6327
- Fail docs build on errors in core notebooks by @michaelosthege in #6324
- Curated ecosystem references by @michaelosthege in #6383
- Switched
run_mypy.py
from pass-listing to fail-listing by @michaelosthege in #6381 - Runing
pydocstyle
in pre-commit by @michaelosthege in #6382 - Removed
NoDistribution
from docs by @stestoll in #6316 - Fix transforms example by @ricardoV94 in #6333
New Contributors
- @digicosmos86 made their first contribution in #6363
Full Changelog: v4.4.0...v5.0.0
v4.4.0
What's Changed
Major Changes 🛠
- Removed support for selectively tracking variables via
pm.sample(trace=[...])
. by @michaelosthege in #6269 - Do not rely on tag information for rv and logp conversions by @ricardoV94 in #6281. This includes:
- Deprecated accessing any of
[value_variable|observations|transform|total_size]
viavar.tag
in favor ofmodel.rvs_to_[values|transforms|total_sizes]
- Deprecated
joint_logp
in favor ofmodel.logp
- Deprecated
aesaraf.rvs_to_value_vars
in favor ofmodel.replace_rvs_by_values
- Deprecated accessing any of
- Using keyword
seed
for initial point no longer supported by @wd60622 in #6291 - Sampling of transformed variables from prior_predictive is no longer allowed by @ricardoV94 in #6309
- Require all step methods to return stats by @michaelosthege in #6313. This includes
- Require all step methods to return stats from their
step/astep
method. - The
BlockedStep.generates_stats
attribute was removed.
- Require all step methods to return stats from their
New Features & Bugfixes 🎉
- Fix shared variable latex by @ricardoV94 in #6260
- Fix bug when replacing random variables with nested value transforms by @ricardoV94 in #6281
- Do not infer
graph_model
node types based on variable Op class by @ricardoV94 in #6259 - Do not propagate dims to observed component of imputed variable by @ricardoV94 in #6263
- Fix Categorical and Multinomial bugs by @ricardoV94 in #6265
- Sample stats for blackjax nuts by @TimOliverMaier in #6264
- Add warning if observed in DensityDist is dict by @symeneses in #6292
- Fix versioneer config to match version tags by @michaelosthege in #6314
Docs & Maintenance 🔧
- Split
sampling.py
intosampling.py
andsampling_forward.py
by @michaelosthege in #6257 - Improve
join_nonshared_inputs
documentation by @wd60622 in #6216 - Move sampling code to a submodule by @michaelosthege in #6268
- Fixed a typo in the overview notebook by @grtyvr in #6274
- Check that sampler vars correspond to value variables in the model by @ricardoV94 in #6235
- Updated pymc.DiscreteWeibull docstring by @hyosubkim in #6283
- Improve random seed processing for SMC sampling by @juanitorduz in #6298
- Remove wrong type-hints and stale docstrings from distributions by @ricardoV94 in #6280
- update theme by @OriolAbril in #6296
- Fix some typos and lints by @Armavica in #6300
- Update docstrings for sample_smc and smc.py by @rowangayleschaefer in #6114
- Fix Flaky Euler-Maruyama Tests by @wd60622 in #6287
New Contributors
- @grtyvr made their first contribution in #6274
- @hyosubkim made their first contribution in #6283
Full Changelog: v4.3.0...v4.4.0
v4.3.0
What's Changed
Major Changes 🛠
- Remove
samples
andkeep_size
fromsample_posterior_predictive
by @pibieta in #6029 - Deprecate old or unused
Model
methods by @ricardoV94 in #6237 - Rename SMC files by @IMvision12 in #6174
- Require backends to record sample stats by @wd60622 in #6205
- Collect sampler warnings only through stats by @michaelosthege in #6192
New Features & Bugfixes 🎉
- Refactor
EulerMaruyama
to work in v4 by @junpenglao in #6227 - Fix bug in
get_vars_in_point_list
when model does not have variables that exist in the trace by @lucianopaz in #6203
Docs & Maintenance 🔧
- Speed up posterior predictive sampling by @OriolAbril in #6208
- Add option to include transformed variables in InferenceData by @dfm in #6232
- Set start method to
"fork"
for MacOs ARM devices by @bchen93 in #6218 - Deprecate
sample_posterior_predictive_w
by @zaxtax in #6254 - Fix latex repr of symbolic distributions by @mattiadg in #6231
- Some doc fixes by @OriolAbril in #6200
- Modify
logo_link
to work with new sphinx schema by @hdnl in #6209 - Fix docstring of the
ZeroInflatedPoisson
distribution by @cscheffler in #6213 - Fix
debug_print
of wrong variable in notebook by @ricardoV94 in #6225 - Fix flaky
TestMixture.test_component_choice_random
by @bherwerth in #6222 - Seed flaky test
TestSamplePPC.test_normal_scalar
by @mattiadg in #6220 - Fix flaky
TestTruncation.truncation_discrete_random
by @mattiadg in #6229 - Seed pm.sample in
BaseSampler(SeededTest)
to make deriving test classes deterministic by @mattiadg in #6251
New Contributors
- @hdnl made their first contribution in #6209
- @mattiadg made their first contribution in #6220
- @bchen93 made their first contribution in #6218
- @IMvision12 made their first contribution in #6174
Full Changelog: v4.2.2...v4.3.0
v4.2.2
What's Changed
New Features & Bugfixes 🎉
- Add
ZeroSumNormal
distribution by @AlexAndorra in #6121 - Refactor Multivariate
RandomWalk
distributions by @ricardoV94 in #6131
Docs & Maintenance 🔧
- Finish restructuring the tests to follow the structure of the code by @Armavica in #6125
- Small typo corrections in Markdown for overview notebook by @willettk in #6183
- Run mypy outside of pre-commit in its own job by @michaelosthege in #6186
- Update docstrings of
set_data
andData
by @bwengals in #6087 - Remove unused trace features by @michaelosthege in #6188
New Contributors
Full Changelog: v4.2.1...v4.2.2
v4.2.1
What's Changed
New Features & Bugfixes 🎉
- Check shared variable values to determine volatility in posterior predictive sampling by @lucianopaz in #6147
- Log name of variables that are sampled in predictive sampling functions by @ricardoV94 in #6142
- Fix
DiscreteUniformRV
dropping degenerate dimension by @ricardoV94 in #6151 - Fix shape bug when creating a truncated normal via
Truncated
by @ricardoV94 in #6165
Docs & Maintenance 🔧
- Repair the plot of
Interpolated
and add an example forDeterministic
by @Armavica in #6126 - Add
constant_fold
helper by @ricardoV94 in #6160 - Use
sigma
instead ofnoise
in GP functions 6094 by @wd60622 in #6145 - Replace multinomial sampling with systematic sampling in
sample_smc
by @aloctavodia in #6162 - Assume
default_output
is the only measurable output inSymbolicRandomVariables
by @ricardoV94 in #6161
New Contributors
Full Changelog: v4.2.0...v4.2.1
v4.2.0
What's Changed
Major Changes 🛠
- Allow broadcasting via observed and dims by @ricardoV94 in #6063
- Remove support for specifying "dims on the fly" from the shapes of variables by @ricardoV94 in #6112
- Automatic versioning with versioneer by @cfonnesbeck in #6078
New Features & Bugfixes 🎉
- Implement Truncated distributions by @ricardoV94 in #6113
- Port
GARCH11
to v4 by @junpenglao in #6119 - Implement Symbolic RVs and enable nested distribution factories (such as Mixtures of Mixtures) by @ricardoV94 in #6072
- Allow for batched
alpha
inStickBreakingWeights
by @purna135 in #6042 - Remove
NoDistribution
and enable.dist
API forSimulator
andDensityDist
by @ricardoV94 in #6110 - Add
start_sigma
to ADVI 2 by @markusschmaus in #6132 - Create .gitpod.yml by @ferrine in #6070 and #6109
Docs & Maintenance 🔧
- Make
rvs_to_values
work with non-RandomVariable
s by @ricardoV94 in #6101 - Fix bug in
Marginalapprox
by @bwengals in #6076 - Fix bug in which
TruncatedNormal
returns-inf
for all values if any value is out of bounds by @adrn in #6128 - Rename
cov_func
/cov
toscale_func
/scale
forTP
/MvStudentT
by @fonnesbeck in #6068 - Ignore
SpecifyShape
when converting to JAX by @martiningram in #6062 - Remove
reshape_t
by @tjburch in #6118 - Fix
Model
docstring by @alekracicot in #6048 - Update opvi docs by @ferrine in #6093
- Fix formatting in documentation of
AR
distribution parameters by @daniel-saunders-phil in #6080 - Fix incorrect formula in
NormalMixture
docstring by @MatthewQuenneville in #6073 - Fix last remaining PyMC3 occurrences & broken link by @Armavica in #6133
- Update GOVERNANCE.md for PyMCon_2022 planning repo by @canyon289 in #6088
- Add new core contributors by @OriolAbril in #6117
- Pin pydata-sphinx-theme by @ricardoV94 in #6120
- Mirror codebase structure in tests by @Armavica in #6084
- Clean up some warnings from the test suite by @Armavica in #6067 and #6074
- Restructure the test suite to follow the code by @Armavica in #6111
New Contributors
- @alekracicot made their first contribution in #6048
- @MatthewQuenneville made their first contribution in #6073
- @tjburch made their first contribution in #6118
- @markusschmaus made their first contribution in #6096
- @cfonnesbeck made their first contribution in #6078
- @adrn made their first contribution in #6128
Full Changelog: v4.1.7...v4.2.0