Skip to content

Commit 16c54c9

Browse files
committed
Add integration test for #684
1 parent e005ef3 commit 16c54c9

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

test/turing/varinfo.jl

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -342,4 +342,19 @@
342342
model = state_space(y, length(t))
343343
@test size(sample(model, NUTS(; adtype=AutoReverseDiff(true)), n), 1) == n
344344
end
345+
346+
if Threads.nthreads() > 1
347+
@testset "DynamicPPL#684: OrderedDict with multiple types when multithreaded" begin
348+
@model function f(x)
349+
ns ~ filldist(Normal(0, 2.0), 3)
350+
m ~ Uniform(0, 1)
351+
x ~ Normal(m, 1)
352+
end
353+
model = f(1)
354+
chain = sample(model, NUTS(), MCMCThreads(), 10, 2);
355+
loglikelihood(model, chain)
356+
logprior(model, chain)
357+
logjoint(model, chain)
358+
end
359+
end
345360
end

0 commit comments

Comments
 (0)