Skip to content

Clarify Wishart warning messaging#8228

Open
yejiming wants to merge 2 commits intopymc-devs:v6from
yejiming:jimmy/wishart-warning-clarify
Open

Clarify Wishart warning messaging#8228
yejiming wants to merge 2 commits intopymc-devs:v6from
yejiming:jimmy/wishart-warning-clarify

Conversation

@yejiming
Copy link
Copy Markdown

Summary

  • clarify the pm.Wishart docstring to explain that PyMC can evaluate its log-probability but it should not be used as a covariance prior in models
  • align the runtime warning with that wording and keep the LKJ alternatives explicit
  • update Wishart warning assertions in the distribution tests and shared test helpers

Testing

  • HOME=/tmp XDG_CACHE_HOME=/tmp MPLCONFIGDIR=/tmp .venv/bin/python -m pytest tests/distributions/test_multivariate.py -k Wishart -q

@welcome
Copy link
Copy Markdown

welcome bot commented Mar 28, 2026

Thank You Banner]
💖 Thanks for opening this pull request! 💖 The PyMC community really appreciates your time and effort to contribute to the project. Please make sure you have read our Contributing Guidelines and filled in our pull request template to the best of your ability.

@read-the-docs-community
Copy link
Copy Markdown

read-the-docs-community bot commented Mar 28, 2026

Documentation build overview

📚 pymc | 🛠️ Build #32021820 | 📁 Comparing f66f118 against latest (0f5c0ca)


🔍 Preview build

Show files changed (26 files in total): 📝 26 modified | ➕ 0 added | ➖ 0 deleted
File Status
glossary.html 📝 modified
contributing/developer_guide.html 📝 modified
_modules/pymc/pytensorf.html 📝 modified
_modules/pymc/testing.html 📝 modified
api/generated/pymc.draw.html 📝 modified
api/generated/pymc.icdf.html 📝 modified
api/generated/pymc.logcdf.html 📝 modified
api/generated/pymc.logp.html 📝 modified
api/generated/pymc.sample_posterior_predictive.html 📝 modified
api/generated/pymc.sample_prior_predictive.html 📝 modified
_modules/pymc/distributions/continuous.html 📝 modified
_modules/pymc/distributions/distribution.html 📝 modified
_modules/pymc/distributions/multivariate.html 📝 modified
_modules/pymc/distributions/shape_utils.html 📝 modified
_modules/pymc/logprob/basic.html 📝 modified
_modules/pymc/model/core.html 📝 modified
_modules/pymc/ode/ode.html 📝 modified
_modules/pymc/sampling/forward.html 📝 modified
_modules/pymc/variational/approximations.html 📝 modified
_modules/pymc/variational/operators.html 📝 modified
_modules/pymc/variational/opvi.html 📝 modified
_modules/pytensor/tensor/basic.html 📝 modified
_modules/pytensor/tensor/math.html 📝 modified
api/distributions/generated/pymc.Wishart.html 📝 modified
api/distributions/generated/classmethods/pymc.SymbolicRandomVariable.update.html 📝 modified
api/model/generated/classmethods/pymc.model.core.Model.compile_fn.html 📝 modified

@twiecki
Copy link
Copy Markdown
Member

twiecki commented Mar 29, 2026

Well technically it should not be used as a prior, period, not just for covariance matrices, no?

@ricardoV94
Copy link
Copy Markdown
Member

ricardoV94 commented Mar 29, 2026

Well technically it should not be used as a prior, period, not just for covariance matrices, no?

Depends what you are going to sample it with. If it's forward only it's fine, if you have a custom sampler it's fine, if you have a custom transform it's fine.

Maybe you are not even going to sample it, just evaluate a model logp for whatever purposes you want. Maybe you just want a pretty grahpviz...

This warning is too opinionated.

@ricardoV94
Copy link
Copy Markdown
Member

ricardoV94 commented Mar 29, 2026

Ah I jumped too fast, yes. In that context, it shouldn't be used as a prior period, doesn't matter what that prior is used for next

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants