ReactiveBayes / RxInfer.jl

Julia package for automated Bayesian inference on a factor graph with reactive message passing
MIT License
254 stars 24 forks source link

Fixes warnings for unused datavars and addons #124

Closed bartvanerp closed 9 months ago

bartvanerp commented 1 year ago

Hi @Chengfeng-Jia, I made a start with #104. I think it has mostly been resolved, but it lacks tests. If @bvdmitri agrees with the solution approach, we can start writing those.

@bvdmitri Is the proposed solution okay? I added the warn argument also in the ModelOptions struct, such that we can use this upon model creation.

bartvanerp commented 10 months ago

ping @bvdmitri :)

bvdmitri commented 10 months ago

@bartvanerp Solution approach is good! I've changed some minor stuff, simple tests would be nice

codecov[bot] commented 10 months ago

Codecov Report

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

Comparison is base (28d5297) 80.09% compared to head (c37ad05) 81.26%.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #124 +/- ## ========================================== + Coverage 80.09% 81.26% +1.17% ========================================== Files 11 11 Lines 1271 1281 +10 ========================================== + Hits 1018 1041 +23 + Misses 253 240 -13 ``` | [Files](https://app.codecov.io/gh/biaslab/RxInfer.jl/pull/124?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=biaslab) | Coverage Δ | | |---|---|---| | [src/inference.jl](https://app.codecov.io/gh/biaslab/RxInfer.jl/pull/124?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=biaslab#diff-c3JjL2luZmVyZW5jZS5qbA==) | `76.10% <85.71%> (+1.36%)` | :arrow_up: | | [src/model.jl](https://app.codecov.io/gh/biaslab/RxInfer.jl/pull/124?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=biaslab#diff-c3JjL21vZGVsLmps) | `86.27% <66.66%> (+0.41%)` | :arrow_up: | ... and [1 file with indirect coverage changes](https://app.codecov.io/gh/biaslab/RxInfer.jl/pull/124/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=biaslab)

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

bartvanerp commented 10 months ago

Thanks @bvdmitri! @Chengfeng-Jia would you be available to test the functionality?

Chengfeng-Jia commented 10 months ago

I will write some tests for that.

Chengfeng-Jia commented 9 months ago

Hi, guys, I wrote some tests for this improvement. However, I added some new models to the existing test code. If you think it's unnecessary please let me know.

bartvanerp commented 9 months ago

Thanks @Chengfeng-Jia! In my opinion the tests look good. I moved everything to test_inference.jl, as we are specifically testing the inference() function, but aside from that, excellent job! @bvdmitri ready for review