Skip to content

Commit 356a787

Browse files
committed
Move loglikelihood test from Turing to DPPL
1 parent b651b74 commit 356a787

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

test/model.jl

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,19 @@ is_typed_varinfo(varinfo::DynamicPPL.SimpleVarInfo{<:NamedTuple}) = true
8383
end
8484
end
8585

86+
@testset "DynamicPPL#684: threadsafe evaluation with multiple types" begin
87+
@model function multiple_types(x)
88+
ns ~ filldist(Normal(0, 2.0), 3)
89+
m ~ Uniform(0, 1)
90+
return x ~ Normal(m, 1)
91+
end
92+
model = multiple_types(1)
93+
chain = make_chain_from_prior(model, 10)
94+
loglikelihood(model, chain)
95+
logprior(model, chain)
96+
logjoint(model, chain)
97+
end
98+
8699
@testset "rng" begin
87100
model = gdemo_default
88101

0 commit comments

Comments
 (0)