From ab043a46381c61df97c1a91316e46b59e2fa798e Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Sat, 15 May 2021 09:34:02 +0200 Subject: [PATCH] CompatHelper: bump compat for "AdvancedMH" to "0.6" for package test (#1613) * CompatHelper: bump compat for "AdvancedMH" to "0.6" for package test * CompatHelper: bump compat for "AdvancedMH" to "0.6" (#1611) Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> * Fix tests * Tests are only compatible with 0.6 * Update mh.jl * Not compatible with 0.6 anymore Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: David Widmann --- Project.toml | 2 +- src/inference/mh.jl | 4 ++-- test/Project.toml | 2 +- test/inference/mh.jl | 6 +++--- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/Project.toml b/Project.toml index 5f239a41d..45e19d769 100644 --- a/Project.toml +++ b/Project.toml @@ -35,7 +35,7 @@ ZygoteRules = "700de1a5-db45-46bc-99cf-38207098b444" [compat] AbstractMCMC = "3.2" AdvancedHMC = "0.2.24" -AdvancedMH = "0.5.2" +AdvancedMH = "0.6" AdvancedPS = "0.1" AdvancedVI = "0.1" BangBang = "0.3" diff --git a/src/inference/mh.jl b/src/inference/mh.jl index d990b2f6a..8fea1cf8b 100644 --- a/src/inference/mh.jl +++ b/src/inference/mh.jl @@ -388,8 +388,8 @@ function propose!( vi::AbstractVarInfo, model::Model, spl::Sampler{<:MH}, - proposal::AdvancedMH.RandomWalkProposal{<:MvNormal} -) + proposal::AdvancedMH.RandomWalkProposal{issymmetric,<:MvNormal} +) where {issymmetric} # If this is the case, we can just draw directly from the proposal # matrix. vals = vi[spl] diff --git a/test/Project.toml b/test/Project.toml index a7c5f8115..a97c4d073 100644 --- a/test/Project.toml +++ b/test/Project.toml @@ -29,7 +29,7 @@ Zygote = "e88e6eb3-aa80-5325-afca-941959d7151f" [compat] AbstractMCMC = "3.2" -AdvancedMH = "0.5.2" +AdvancedMH = "0.6" AdvancedPS = "0.1" AdvancedVI = "0.1" Clustering = "0.14" diff --git a/test/inference/mh.jl b/test/inference/mh.jl index 2de6abdf4..ba15f2bc8 100644 --- a/test/inference/mh.jl +++ b/test/inference/mh.jl @@ -69,10 +69,10 @@ dt, vt = Inference.dist_val_tuple(sampler, Turing.VarInfo(model)) - @test dt[:z] isa AdvancedMH.StaticProposal{<:MvNormal} - @test dt[:m] isa AdvancedMH.StaticProposal{Vector{ContinuousUnivariateDistribution}} + @test dt[:z] isa AdvancedMH.StaticProposal{false,<:MvNormal} + @test dt[:m] isa AdvancedMH.StaticProposal{false,Vector{ContinuousUnivariateDistribution}} @test dt[:m].proposal[1] isa Normal && dt[:m].proposal[2] isa InverseGamma - @test dt[:s] isa AdvancedMH.StaticProposal{<:InverseGamma} + @test dt[:s] isa AdvancedMH.StaticProposal{false,<:InverseGamma} @test vt[:z] isa Vector{Float64} && length(vt[:z]) == 2 @test vt[:m] isa Vector{Float64} && length(vt[:m]) == 2