Skip to content

Commit

Permalink
Replace vectorize(d, r) -> DynamicPPL.tovec(r)
Browse files Browse the repository at this point in the history
vectorize was removed in DynamicPPL 0.29.0
  • Loading branch information
penelopeysm committed Oct 2, 2024
1 parent 3568649 commit f43e57d
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/mcmc/Inference.jl
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ using DynamicPPL: Metadata, VarInfo, TypedVarInfo,
islinked, invlink!, link!,
setindex!!, push!!,
setlogp!!, getlogp,
VarName, getsym, vectorize,
VarName, getsym,
_getvns, getdist,
Model, Sampler, SampleFromPrior, SampleFromUniform,
DefaultContext, PriorContext,
Expand Down
2 changes: 1 addition & 1 deletion src/mcmc/ess.jl
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ struct ESSPrior{M<:Model,S<:Sampler{<:ESS},V<:AbstractVarInfo,T}
dist = getdist(varinfo, vn)
EllipticalSliceSampling.isgaussian(typeof(dist)) ||
error("[ESS] only supports Gaussian prior distributions")
vectorize(dist, mean(dist))
DynamicPPL.tovec(mean(dist))
end
return new{M,S,V,typeof(μ)}(model, sampler, varinfo, μ)
end
Expand Down
2 changes: 1 addition & 1 deletion src/mcmc/particle_mcmc.jl
Original file line number Diff line number Diff line change
Expand Up @@ -380,7 +380,7 @@ function DynamicPPL.assume(
elseif is_flagged(vi, vn, "del")
unset_flag!(vi, vn, "del") # Reference particle parent
r = rand(trng, dist)
vi[vn] = vectorize(dist, r)
vi[vn] = DynamicPPL.tovec(r)
DynamicPPL.setgid!(vi, spl.selector, vn)
setorder!(vi, vn, get_num_produce(vi))
else
Expand Down
2 changes: 1 addition & 1 deletion test/Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ Clustering = "0.14, 0.15"
Distributions = "0.25"
DistributionsAD = "0.6.3"
DynamicHMC = "2.1.6, 3.0"
DynamicPPL = "0.28, 0.29"
DynamicPPL = "0.29"
FiniteDifferences = "0.10.8, 0.11, 0.12"
ForwardDiff = "0.10.12 - 0.10.32, 0.10"
HypothesisTests = "0.11"
Expand Down

0 comments on commit f43e57d

Please sign in to comment.