Skip to content

feat(distributions): support symbolic eta in LKJCholeskyCov logp - #8404

Open
sankhyanreyansh wants to merge 1 commit into
pymc-devs:mainfrom
sankhyanreyansh:feat-lkj-cholesky-symbolic-eta
Open

feat(distributions): support symbolic eta in LKJCholeskyCov logp#8404
sankhyanreyansh wants to merge 1 commit into
pymc-devs:mainfrom
sankhyanreyansh:feat-lkj-cholesky-symbolic-eta

Conversation

@sankhyanreyansh

Copy link
Copy Markdown
Contributor

Description

This PR allows the eta parameter in pm.LKJCholeskyCov to be a symbolic/dynamic PyTensor variable (e.g., placing a prior such as pm.HalfNormal on eta), bringing it to feature parity with LKJCorr.logp.

  • Removes the try...except NotScalarConstantError restriction on eta in _LKJCholeksyCovRV_logp.
  • Preserves the scalar constant check for n (since static matrix dimensioning is required by PyTensor shape indexing).
  • Updates the relevant TODO in pymc/distributions/multivariate.py.
  • Adds unit tests in tests/distributions/test_multivariate.py verifying finite logp and dlogp evaluations with symbolic eta, as well as validating that non-constant n still raises NotImplementedError.

Related Issue

Checklist

Type of change

  • New feature / enhancement
  • Bug fix
  • Documentation
  • Maintenance
  • Other (please specify):

@read-the-docs-community

Copy link
Copy Markdown

Documentation build overview

📚 pymc | 🛠️ Build #34172782 | 📁 Comparing 5a39fbd against latest (da8fc47)

  🔍 Preview build  

3 files changed
± glossary.html
± _modules/pymc/distributions/multivariate.html
± _modules/pytensor/tensor/extra_ops.html

@codecov

codecov Bot commented Aug 21, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 91.88%. Comparing base (47bdf54) to head (5a39fbd).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##             main    #8404   +/-   ##
=======================================
  Coverage   91.87%   91.88%           
=======================================
  Files         128      128           
  Lines       21256    21253    -3     
=======================================
- Hits        19530    19529    -1     
+ Misses       1726     1724    -2     
Files with missing lines Coverage Δ
pymc/distributions/multivariate.py 95.58% <ø> (+0.20%) ⬆️
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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.

Support symbolic eta parameter in LKJCholeskyCov.logp

1 participant