File tree Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -9,19 +9,26 @@ using Turing
9
9
@testset " container.jl" begin
10
10
@model function test ()
11
11
a ~ Normal (0 , 1 )
12
+ println (" a" )
12
13
x ~ Bernoulli (1 )
14
+ println (" x" )
13
15
b ~ Gamma (2 , 3 )
16
+ println (" b" )
14
17
1 ~ Bernoulli (x / 2 )
18
+ println (" 1" )
15
19
c ~ Beta ()
20
+ println (" c" )
16
21
0 ~ Bernoulli (x / 2 )
22
+ println (" 0" )
17
23
return x
18
24
end
19
25
20
26
@testset " constructor" begin
21
27
vi = DynamicPPL. VarInfo ()
22
- sampler = Sampler (PG (10 ))
28
+ vi = DynamicPPL. setacc!! (vi, Turing. Inference. ProduceLogLikelihoodAccumulator ())
29
+ spl = Sampler (PG (10 ))
23
30
model = test ()
24
- trace = AdvancedPS. Trace (model, sampler , vi, AdvancedPS. TracedRNG ())
31
+ trace = AdvancedPS. Trace (model, spl , vi, AdvancedPS. TracedRNG ())
25
32
26
33
# Make sure the backreference from taped_globals to the trace is in place.
27
34
@test trace. model. ctask. taped_globals. other === trace
@@ -46,6 +53,7 @@ using Turing
46
53
return a, b
47
54
end
48
55
vi = DynamicPPL. VarInfo ()
56
+ vi = DynamicPPL. setacc!! (vi, Turing. Inference. ProduceLogLikelihoodAccumulator ())
49
57
sampler = Sampler (PG (10 ))
50
58
model = normal ()
51
59
You can’t perform that action at this time.
0 commit comments