Skip to content

Commit

Permalink
Bump DPPL version to 0.27 (#2225)
Browse files Browse the repository at this point in the history
* bump DPPL version to 0.27

* make minor version for dppl 0.27.1 to include error message

* fixed failing tests
  • Loading branch information
torfjelde authored May 18, 2024
1 parent 53aff19 commit a8f1bbc
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 13 deletions.
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

2 comments on commit a8f1bbc

@torfjelde
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JuliaRegistrator
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Registration pull request created: JuliaRegistries/General/107141

Tip: Release Notes

Did you know you can add release notes too? Just add markdown formatted text underneath the comment after the text
"Release notes:" and it will be added to the registry PR, and if TagBot is installed it will also be added to the
release that TagBot creates. i.e.

@JuliaRegistrator register

Release notes:

## Breaking changes

- blah

To add them here just re-invoke and the PR will be updated.

Tagging

After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.

This will be done automatically if the Julia TagBot GitHub Action is installed, or can be done manually through the github interface, or via:

git tag -a v0.32.0 -m "<description of version>" a8f1bbc9f3981d3810efd8260c9264cd1d775b34
git push origin v0.32.0

Please sign in to comment.