Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Project.toml
Original file line number Diff line number Diff line change
@@ -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"
Expand Down Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion test/Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
20 changes: 10 additions & 10 deletions test/mcmc/Inference.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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]
Expand Down Expand Up @@ -506,32 +506,32 @@
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)
@. x ~ Normal(0, 2)
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)
@. x ~ InverseGamma(2, 3)
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
Expand Down