Skip to content

Commit 2b2f352

Browse files
committed
Test Gibbs sampling
1 parent e86938e commit 2b2f352

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

test/ad.jl

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -279,4 +279,14 @@ end
279279
end
280280
end
281281

282+
@testset verbose = true "AD / Gibbs sampling" begin
283+
# Make sure that Gibbs sampling doesn't fall over when using AD.
284+
spl = Gibbs(@varname(s) => HMC(0.1, 10), @varname(m) => HMC(0.1, 10))
285+
@testset "adtype=$adtype" for adtype in ADTYPES
286+
@testset "model=$(model.f)" for model in DEMO_MODELS
287+
@test sample(model, spl, 2) isa Any
288+
end
289+
end
290+
end
291+
282292
end # module

0 commit comments

Comments
 (0)