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

More fixes for DynamicPPL 0.35 #2494

Open
wants to merge 6 commits into
base: mhauru/dppl-0.35
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
371 changes: 0 additions & 371 deletions test/dynamicppl/compiler.jl

This file was deleted.

11 changes: 1 addition & 10 deletions test/mcmc/Inference.jl
Original file line number Diff line number Diff line change
Expand Up @@ -440,15 +440,6 @@ using Turing

res = sample(StableRNG(seed), vdemo1b(x), alg, 10)

@model function vdemo2(x)
μ ~ MvNormal(zeros(size(x, 1)), I)
@. x ~ $(MvNormal(μ, I))
end

D = 2
alg = HMC(0.01, 5; adtype=adbackend)
res = sample(StableRNG(seed), vdemo2(randn(D, 100)), alg, 10)

Comment on lines -443 to -451
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think vdemo2 can just be removed, since it just directly expands to x .~ MvNormal which is now forbidden, and if the point is to test interpolation inside @., then that should be added to the compiler tests in DynamicPPL.

If you'd like me to add that test over there, let me know and I can open an issue

# Vector assumptions
N = 10
alg = HMC(0.2, 4; adtype=adbackend)
Expand Down Expand Up @@ -492,7 +483,7 @@ using Turing
N = 3
@model function vdemo7()
x = Array{Real}(undef, N, N)
@. x ~ [InverseGamma(2, 3) for i in 1:N]
x ~ filldist(InverseGamma(2, 3), N, N)
end
Comment on lines 484 to 487
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is a straightforward replacement

We could also do x ~ product_distribution([product_distribution([InverseGamma(2, 3) for i in 1:N]) for j in 1:N]) if you prefer which seems a bit closer to the original


sample(StableRNG(seed), vdemo7(), alg, 10)
Expand Down
Loading
Loading