@@ -17,9 +17,11 @@ import Mooncake
1717using Test: @test , @test_throws , @testset
1818using Turing
1919
20- @testset " Testing inference.jl with $adbackend " for adbackend in ADUtils. adbackends
21- @info " Starting Inference.jl tests with $adbackend "
20+ @testset " Testing Inference.jl" begin
21+ @info " Starting Inference.jl tests"
22+
2223 seed = 23
24+ adbackend = Turing. DEFAULT_ADTYPE
2325
2426 @testset " threaded sampling" begin
2527 # Test that chains with the same seed will sample identically.
@@ -44,7 +46,7 @@ using Turing
4446 @test chain1. value == chain2. value
4547 end
4648
47- # Should also be stable with am explicit RNG
49+ # Should also be stable with an explicit RNG
4850 seed = 5
4951 rng = Random. MersenneTwister (seed)
5052 for sampler in samplers
@@ -273,17 +275,12 @@ using Turing
273275
274276 @testset " forbid global" begin
275277 xs = [1.5 2.0 ]
276- # xx = 1
277278
278279 @model function fggibbstest (xs)
279280 s ~ InverseGamma (2 , 3 )
280281 m ~ Normal (0 , sqrt (s))
281- # xx ~ Normal(m, sqrt(s)) # this is illegal
282-
283282 for i in 1 : length (xs)
284283 xs[i] ~ Normal (m, sqrt (s))
285- # for xx in xs
286- # xx ~ Normal(m, sqrt(s))
287284 end
288285 return s, m
289286 end
@@ -353,7 +350,7 @@ using Turing
353350 )
354351 end
355352
356- # TODO (mhauru) What is this testing? Why does it not use the looped-over adbackend?
353+ # TODO (mhauru) What is this testing? Why does it use a different adbackend?
357354 @testset " new interface" begin
358355 obs = [0 , 1 , 0 , 1 , 1 , 1 , 1 , 1 , 1 , 1 ]
359356
0 commit comments