pymc-devs / pymc

Bayesian Modeling and Probabilistic Programming in Python
https://docs.pymc.io/
Other
8.67k stars 2k forks source link

Fix `compute_log_prior` in models with `Deterministics` #7168

Closed OriolAbril closed 7 months ago

OriolAbril commented 7 months ago

Description

The default for var_names in compute_log_likelihood was unobserved_RVs which includes also deterministics. This changes the default to free_RVs.

Related Issue

Checklist

Type of change


πŸ“š Documentation preview πŸ“š: https://pymc--7168.org.readthedocs.build/en/7168/

codecov[bot] commented 7 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Comparison is base (97a7a00) 92.29% compared to head (34d2a5d) 92.29%.

Additional details and impacted files [![Impacted file tree graph](https://app.codecov.io/gh/pymc-devs/pymc/pull/7168/graphs/tree.svg?width=650&height=150&src=pr&token=JFuXtOJ4Cb&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pymc-devs)](https://app.codecov.io/gh/pymc-devs/pymc/pull/7168?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pymc-devs) ```diff @@ Coverage Diff @@ ## main #7168 +/- ## ======================================= Coverage 92.29% 92.29% ======================================= Files 101 101 Lines 16947 16947 ======================================= Hits 15642 15642 Misses 1305 1305 ``` | [Files](https://app.codecov.io/gh/pymc-devs/pymc/pull/7168?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pymc-devs) | Coverage Ξ” | | |---|---|---| | [pymc/stats/log\_density.py](https://app.codecov.io/gh/pymc-devs/pymc/pull/7168?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pymc-devs#diff-cHltYy9zdGF0cy9sb2dfZGVuc2l0eS5weQ==) | `98.30% <100.00%> (ΓΈ)` | |