|
9 | 9 | end |
10 | 10 | end |
11 | 11 | model = demo1() |
12 | | - @test DynamicPPL.determine_suitable_varinfo(model; verbose=true) isa |
13 | | - DynamicPPL.UntypedVarInfo |
| 12 | + @test DynamicPPL.determine_suitable_varinfo(model) isa DynamicPPL.UntypedVarInfo |
14 | 13 |
|
15 | 14 | @model demo2() = x ~ Normal() |
16 | 15 | @test DynamicPPL.determine_suitable_varinfo(demo2()) isa DynamicPPL.TypedVarInfo |
|
25 | 24 | z ~ Normal() |
26 | 25 | end |
27 | 26 | end |
28 | | - @test DynamicPPL.determine_suitable_varinfo(demo3(); verbose=true) isa |
29 | | - DynamicPPL.UntypedVarInfo |
| 27 | + @test DynamicPPL.determine_suitable_varinfo(demo3()) isa DynamicPPL.UntypedVarInfo |
30 | 28 |
|
31 | 29 | # Evaluation works (and it would even do so in practice), but sampling |
32 | 30 | # fill fail due to storing `Cauchy{Float64}` in `Vector{Normal{Float64}}`. |
|
38 | 36 | y ~ Cauchy() # different distibution, but same transformation |
39 | 37 | end |
40 | 38 | end |
41 | | - @test DynamicPPL.determine_suitable_varinfo(demo4(); verbose=true) isa |
42 | | - DynamicPPL.UntypedVarInfo |
| 39 | + @test DynamicPPL.determine_suitable_varinfo(demo4()) isa DynamicPPL.UntypedVarInfo |
43 | 40 |
|
44 | 41 | # In this model, the type error occurs in the user code rather than in DynamicPPL. |
45 | 42 | @model function demo5() |
|
51 | 48 | return sum(xs) |
52 | 49 | end |
53 | 50 | # Should pass if we're only checking the tilde statements. |
54 | | - @test DynamicPPL.determine_suitable_varinfo(demo5(); verbose=true) isa |
55 | | - DynamicPPL.TypedVarInfo |
| 51 | + @test DynamicPPL.determine_suitable_varinfo(demo5()) isa DynamicPPL.TypedVarInfo |
56 | 52 | # Should fail if we're including errors in the model body. |
57 | | - @test DynamicPPL.determine_suitable_varinfo( |
58 | | - demo5(); verbose=true, only_tilde=false |
59 | | - ) isa DynamicPPL.UntypedVarInfo |
| 53 | + @test DynamicPPL.determine_suitable_varinfo(demo5(); only_tilde=false) isa |
| 54 | + DynamicPPL.UntypedVarInfo |
60 | 55 | end |
61 | 56 |
|
62 | 57 | @testset "demo models" begin |
|
0 commit comments