pymc-devs / pymc

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

Fix spurious inputs failure when building Truncated variables #7328

Closed ricardoV94 closed 1 month ago

ricardoV94 commented 1 month ago

Description

Reintroduce dummy intermediate variables in implementation of TruncatedRV

Partially reverts 9d4a3d7d371eda91be99c9bffc519d680d2cf290 and 3888d53575dfc2bf8527e4d69a7621645df5cbf6

The logprob derivation(s) in the icdf implementation of Truncated can duplicate nodes and cause spurious input variables to be marked as missing. We revert back to the old approach of replacing these by dummies so the graph above any inputs is hidden, and variables cannot be accidentally cloned/modified during logprob inference.

Related Issue

Checklist

Type of change


📚 Documentation preview 📚: https://pymc--7328.org.readthedocs.build/en/7328/