ReactiveBayes / ReactiveMP.jl

High-performance reactive message-passing based Bayesian inference engine
MIT License
103 stars 14 forks source link

[DO NOT MERGE] Allow rules with Missing inputs #373

Closed bvdmitri closed 8 months ago

bvdmitri commented 8 months ago

Spotted by @wouterwln & @bartvanerp . New logic for the predictions did not take into account that someone would want to define a rule that accepts Missing as an argument. In the current logic, if we have Missing argument we don't even call the rule, which could be potentially defined. This PR changes this and allows users to define their rules with Missing arguments while preserving the previous functionality.

codecov[bot] commented 8 months ago

Codecov Report

Attention: 8 lines in your changes are missing coverage. Please review.

Comparison is base (6216f23) 62.14% compared to head (a61fbbb) 62.21%.

Files Patch % Lines
src/rule.jl 50.00% 6 Missing :warning:
src/marginal.jl 0.00% 1 Missing :warning:
src/message.jl 0.00% 1 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #373 +/- ## ========================================== + Coverage 62.14% 62.21% +0.06% ========================================== Files 181 181 Lines 5931 5933 +2 ========================================== + Hits 3686 3691 +5 + Misses 2245 2242 -3 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

bvdmitri commented 8 months ago

This PR won't work because many mean-field rules accept Any as an argument