@@ -5,7 +5,7 @@ using ..NumericalTests: check_gdemo, check_numerical
55using AbstractMCMC: AbstractMCMC
66using Bijectors: Bijectors
77using Distributions: Bernoulli, Beta, Categorical, Dirichlet, Normal, Wishart, sample
8- using DynamicPPL: DynamicPPL, Sampler
8+ using DynamicPPL: DynamicPPL
99import ForwardDiff
1010using HypothesisTests: ApproximateTwoSampleKSTest, pvalue
1111import ReverseDiff
@@ -297,35 +297,12 @@ using Turing
297297 # check_gdemo(res)
298298 end
299299
300- @testset " hmcda constructor" begin
301- alg = HMCDA (0.8 , 0.75 )
302- sampler = Sampler (alg)
303- @test DynamicPPL. alg_str (sampler) == " HMCDA"
304-
305- alg = HMCDA (200 , 0.8 , 0.75 )
306- sampler = Sampler (alg)
307- @test DynamicPPL. alg_str (sampler) == " HMCDA"
308-
309- @test isa (alg, HMCDA)
310- @test isa (sampler, Sampler{<: Turing.Inference.Hamiltonian })
311- end
312-
313300 @testset " nuts inference" begin
314301 alg = NUTS (1000 , 0.8 )
315302 res = sample (StableRNG (seed), gdemo_default, alg, 5_000 )
316303 check_gdemo (res)
317304 end
318305
319- @testset " nuts constructor" begin
320- alg = NUTS (200 , 0.65 )
321- sampler = Sampler (alg)
322- @test DynamicPPL. alg_str (sampler) == " NUTS"
323-
324- alg = NUTS (0.65 )
325- sampler = Sampler (alg)
326- @test DynamicPPL. alg_str (sampler) == " NUTS"
327- end
328-
329306 @testset " check discard" begin
330307 alg = NUTS (100 , 0.8 )
331308
@@ -456,7 +433,7 @@ using Turing
456433 vi = DynamicPPL. VarInfo (gdemo_default)
457434 vi = DynamicPPL. link (vi, gdemo_default)
458435 ldf = LogDensityFunction (gdemo_default, vi; adtype= Turing. DEFAULT_ADTYPE)
459- spl = Sampler ( alg)
436+ spl = alg
460437 _, hmc_state = AbstractMCMC. step (Random. default_rng (), ldf, spl)
461438 # Check that we can obtain the current step size
462439 @test Turing. Inference. getstepsize (spl, hmc_state) isa Float64
0 commit comments