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

Method calls itself - potential stack overflow

Open mohdibntarek opened this issue 4 years ago • 2 comments

This function calls itself. There is another one with a !.

mohdibntarek avatar Apr 27 '21 15:04 mohdibntarek

Good catch! Seems a bit difficult to provoke and test though since there are other definitions for UnivariateDistribution, MultivariateDistribution, and MatrixDistribution... Maybe it should just be removed, and if someone uses a custom distribution that does not fit in these categories she has to implement DynamicPPL.reconstruct?

devmotion avatar Apr 27 '21 15:04 devmotion

Sounds reasonable, or we can throw an error saying please implement this function.

mohdibntarek avatar Apr 27 '21 15:04 mohdibntarek

This is likely fixed by the evaluate!! API.

yebai avatar Nov 02 '22 20:11 yebai