Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Materialize anonymous variables later only if needed #164

Merged
merged 5 commits into from
Mar 8, 2024

Conversation

bvdmitri
Copy link
Member

@bvdmitri bvdmitri commented Mar 8, 2024

Includes #163 (please merge #163 first)

A silly bug we missed, the fix is pretty easy though.

Didn't add the tests yet (added), but this is a reproducer

@model function mv_iid_inverse_wishart_known_mean(y, m, d)
    C ~ InverseWishart(d + 1, diageye(d))

    for i in eachindex(y)
        y[i] ~ MvNormal= m, Σ = C)
    end
end

Without this PR the engine creates an anonymous random variable for d + 1, but it shouldn't (if d is a number and not a data).

@bvdmitri bvdmitri requested a review from wouterwln March 8, 2024 12:59
@bvdmitri bvdmitri marked this pull request as ready for review March 8, 2024 13:08
Copy link

codecov bot commented Mar 8, 2024

Codecov Report

Attention: Patch coverage is 95.23810% with 1 lines in your changes are missing coverage. Please review.

Project coverage is 91.34%. Comparing base (9de8055) to head (e199e5b).
Report is 25 commits behind head on dev-4.0.0.

Files Patch % Lines
src/graph_engine.jl 95.23% 1 Missing ⚠️
Additional details and impacted files
@@              Coverage Diff              @@
##           dev-4.0.0     #164      +/-   ##
=============================================
+ Coverage      90.98%   91.34%   +0.35%     
=============================================
  Files             14       14              
  Lines           1742     1733       -9     
=============================================
- Hits            1585     1583       -2     
+ Misses           157      150       -7     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@wouterwln wouterwln merged commit 54228dc into dev-4.0.0 Mar 8, 2024
11 checks passed
@wouterwln wouterwln deleted the dev-anonymous-materialization-bug branch March 8, 2024 15:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants