DynamicPPL.jl icon indicating copy to clipboard operation
DynamicPPL.jl copied to clipboard

Warn on `±Inf` in `check_model`

Open penelopeysm opened this issue 9 months ago • 1 comments

https://github.com/TuringLang/DynamicPPL.jl/pull/888 modifies the check_model function such that it errors if any NaN's are encountered on the left-hand side of a tilde statement.

This issue is to record the idea that there could be some kind of warning / info message for ±Inf as well. However, this would depend on whether it's reasonable to have Inf as a value; if Inf is actually in the support of the distribution on the right, then it would be fine.

Anyone implementing this would have to be careful about doing it correctly for multivariate distributions, especially product distributions.

penelopeysm avatar Apr 10 '25 23:04 penelopeysm

It might also be useful to check for if logp ever become Inf at any point

sunxd3 avatar Apr 11 '25 13:04 sunxd3