ReactiveMP.jl
ReactiveMP.jl copied to clipboard
`@rule .... (m_out :: PointMass,)` and `@rule .... (q_out :: PointMass,)` are identical but should both be defined
When defining rules around a node where a PointMass
distribution comes in, we default to @rule .... (q_out :: PointMass,)
even if the prior is conjugate. Therefore when defining a new node, even when we use message passing, as user will probably first define @rule .... (q_out :: PointMass,)
and then get an error message saying that @rule .... (q_out :: PointMass,)
is not defined, even though these rules are identical.
We might have had already opened an issue about that before. It is true that the implementation is suboptimal and requires both rule to be defined, even though they are indeed identical. The idea was that the rules where all arguments are of type PointMass
could be pre-regenerated in the @node
macro. But we decided not to approach it and perhaps instead rework the @rule
macro and message update rules such that it is no longer needed. For now the workaround is to define both rules.