Skip to content

Commit

Permalink
CompatHelper: bump compat for "AdvancedMH" to "0.6" for package test (#…
Browse files Browse the repository at this point in the history
…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 <[email protected]>
  • Loading branch information
github-actions[bot] and devmotion authored May 15, 2021
1 parent ce55956 commit ab043a4
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
4 changes: 2 additions & 2 deletions src/inference/mh.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down
2 changes: 1 addition & 1 deletion test/Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
6 changes: 3 additions & 3 deletions test/inference/mh.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit ab043a4

Please sign in to comment.