TuringLang / DynamicPPL.jl

Implementation of domain-specific language (DSL) for dynamic probabilistic programming
https://turinglang.org/DynamicPPL.jl/
MIT License
164 stars 29 forks source link

Allow `merge` to work on `VarInfo` with different distributions #562

Closed torfjelde closed 11 months ago

torfjelde commented 11 months ago

Expected behavior of merge is that it gives precedence to the right-most argument, but currently we raise an error in the scenario where the distributions between two varinfos don't match. This shouldn't be done (and is prohibitive to making the Gibbs sampler in https://github.com/TuringLang/Turing.jl/pull/2099 work).

This PR fixes this.

coveralls commented 11 months ago

Pull Request Test Coverage Report for Build 6905019250


Files with Coverage Reduction New Missed Lines %
src/varinfo.jl 1 86.61%
<!-- Total: 1 -->
Totals Coverage Status
Change from base Build 6895060737: -0.01%
Covered Lines: 2535
Relevant Lines: 3159

💛 - Coveralls
codecov[bot] commented 11 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Comparison is base (485ebfb) 80.25% compared to head (94744df) 80.24%.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #562 +/- ## ========================================== - Coverage 80.25% 80.24% -0.02% ========================================== Files 25 25 Lines 3161 3159 -2 ========================================== - Hits 2537 2535 -2 Misses 624 624 ```

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