@@ -17,9 +17,11 @@ import Mooncake
17
17
using Test: @test , @test_throws , @testset
18
18
using Turing
19
19
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
+
22
23
seed = 23
24
+ adbackend = Turing. DEFAULT_ADTYPE
23
25
24
26
@testset " threaded sampling" begin
25
27
# Test that chains with the same seed will sample identically.
@@ -44,7 +46,7 @@ using Turing
44
46
@test chain1. value == chain2. value
45
47
end
46
48
47
- # Should also be stable with am explicit RNG
49
+ # Should also be stable with an explicit RNG
48
50
seed = 5
49
51
rng = Random. MersenneTwister (seed)
50
52
for sampler in samplers
@@ -273,17 +275,12 @@ using Turing
273
275
274
276
@testset " forbid global" begin
275
277
xs = [1.5 2.0 ]
276
- # xx = 1
277
278
278
279
@model function fggibbstest (xs)
279
280
s ~ InverseGamma (2 , 3 )
280
281
m ~ Normal (0 , sqrt (s))
281
- # xx ~ Normal(m, sqrt(s)) # this is illegal
282
-
283
282
for i in 1 : length (xs)
284
283
xs[i] ~ Normal (m, sqrt (s))
285
- # for xx in xs
286
- # xx ~ Normal(m, sqrt(s))
287
284
end
288
285
return s, m
289
286
end
@@ -353,7 +350,7 @@ using Turing
353
350
)
354
351
end
355
352
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?
357
354
@testset " new interface" begin
358
355
obs = [0 , 1 , 0 , 1 , 1 , 1 , 1 , 1 , 1 , 1 ]
359
356
0 commit comments