TuringLang / DynamicPPL.jl

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

Use `subsume` when checking for repeated varnames #602

Closed torfjelde closed 4 months ago

torfjelde commented 4 months ago

@sunxd3 pointed out that we should be using subsume rather than equality when checking whether a varname has been seen in the model already (https://github.com/TuringLang/Turing.jl/pull/2218#issuecomment-2100722690).

This PR does exactly that.

coveralls commented 4 months ago

Pull Request Test Coverage Report for Build 9021828428

Details


Changes Missing Coverage Covered Lines Changed/Added Lines %
src/debug_utils.jl 5 15 33.33%
<!-- Total: 5 15 33.33% -->
Totals Coverage Status
Change from base Build 8991588253: -0.2%
Covered Lines: 2789
Relevant Lines: 3552

💛 - Coveralls
torfjelde commented 4 months ago

@sunxd3 @devmotion @yebai can one of you have a look at this? Should be a quick merge

sunxd3 commented 4 months ago

@torfjelde do you think is it worth it to add test for member test (e.g. a and a.b)? Otherwise, look good to me. Thanks for this.