diff --git a/Project.toml b/Project.toml index 2ab84eab6..5b51a78e9 100644 --- a/Project.toml +++ b/Project.toml @@ -1,6 +1,6 @@ name = "Turing" uuid = "fce5fe82-541a-59a6-adf8-730c64b5f9a0" -version = "0.31.5" +version = "0.32.0" [deps] ADTypes = "47edcb42-4c32-4615-8424-f2b9edc5f35b" @@ -59,7 +59,7 @@ Distributions = "0.23.3, 0.24, 0.25" DistributionsAD = "0.6" DocStringExtensions = "0.8, 0.9" DynamicHMC = "3.4" -DynamicPPL = "0.25.1" +DynamicPPL = "0.27.1" EllipticalSliceSampling = "0.5, 1, 2" ForwardDiff = "0.10.3" Libtask = "0.7, 0.8" diff --git a/test/Project.toml b/test/Project.toml index f743f3bbc..b9c232dd8 100644 --- a/test/Project.toml +++ b/test/Project.toml @@ -41,7 +41,7 @@ Clustering = "0.14, 0.15" Distributions = "0.25" DistributionsAD = "0.6.3" DynamicHMC = "2.1.6, 3.0" -DynamicPPL = "0.25.1" +DynamicPPL = "0.27" FiniteDifferences = "0.10.8, 0.11, 0.12" ForwardDiff = "0.10.12 - 0.10.32, 0.10" HypothesisTests = "0.11" diff --git a/test/mcmc/Inference.jl b/test/mcmc/Inference.jl index f8c9284b6..e1d0f9e96 100644 --- a/test/mcmc/Inference.jl +++ b/test/mcmc/Inference.jl @@ -274,8 +274,8 @@ @test_throws ErrorException chain = sample(gauss2(; x=x), PG(10), 10) @test_throws ErrorException chain = sample(gauss2(; x=x), SMC(), 10) - @test_throws ErrorException chain = sample(gauss2(Vector{Float64}; x=x), PG(10), 10) - @test_throws ErrorException chain = sample(gauss2(Vector{Float64}; x=x), SMC(), 10) + @test_throws ErrorException chain = sample(gauss2(DynamicPPL.TypeWrap{Vector{Float64}}(); x=x), PG(10), 10) + @test_throws ErrorException chain = sample(gauss2(DynamicPPL.TypeWrap{Vector{Float64}}(); x=x), SMC(), 10) @model function gauss3(x, ::Type{TV}=Vector{Float64}) where {TV} priors = TV(undef, 2) @@ -290,8 +290,8 @@ chain = sample(gauss3(x), PG(10), 10) chain = sample(gauss3(x), SMC(), 10) - chain = sample(gauss3(x, Vector{Real}), PG(10), 10) - chain = sample(gauss3(x, Vector{Real}), SMC(), 10) + chain = sample(gauss3(x, DynamicPPL.TypeWrap{Vector{Real}}()), PG(10), 10) + chain = sample(gauss3(x, DynamicPPL.TypeWrap{Vector{Real}}()), SMC(), 10) end @testset "new interface" begin obs = [0, 1, 0, 1, 1, 1, 1, 1, 1, 1] @@ -506,10 +506,10 @@ end t_loop = @elapsed res = sample(vdemo1(), alg, 250) - t_loop = @elapsed res = sample(vdemo1(Float64), alg, 250) + t_loop = @elapsed res = sample(vdemo1(DynamicPPL.TypeWrap{Float64}()), alg, 250) vdemo1kw(; T) = vdemo1(T) - t_loop = @elapsed res = sample(vdemo1kw(; T=Float64), alg, 250) + t_loop = @elapsed res = sample(vdemo1kw(; T=DynamicPPL.TypeWrap{Float64}()), alg, 250) @model function vdemo2(::Type{T}=Float64) where {T<:Real} x = Vector{T}(undef, N) @@ -517,10 +517,10 @@ end t_vec = @elapsed res = sample(vdemo2(), alg, 250) - t_vec = @elapsed res = sample(vdemo2(Float64), alg, 250) + t_vec = @elapsed res = sample(vdemo2(DynamicPPL.TypeWrap{Float64}()), alg, 250) vdemo2kw(; T) = vdemo2(T) - t_vec = @elapsed res = sample(vdemo2kw(; T=Float64), alg, 250) + t_vec = @elapsed res = sample(vdemo2kw(; T=DynamicPPL.TypeWrap{Float64}()), alg, 250) @model function vdemo3(::Type{TV}=Vector{Float64}) where {TV<:AbstractVector} x = TV(undef, N) @@ -528,10 +528,10 @@ end sample(vdemo3(), alg, 250) - sample(vdemo3(Vector{Float64}), alg, 250) + sample(vdemo3(DynamicPPL.TypeWrap{Vector{Float64}}()), alg, 250) vdemo3kw(; T) = vdemo3(T) - sample(vdemo3kw(; T=Vector{Float64}), alg, 250) + sample(vdemo3kw(; T=DynamicPPL.TypeWrap{Vector{Float64}}()), alg, 250) end @testset "names_values" begin