From 709dc9ecff1ed7cde441447ca6a6108f182a219c Mon Sep 17 00:00:00 2001 From: Penelope Yong Date: Wed, 9 Jul 2025 20:47:54 +0100 Subject: [PATCH 1/8] point to unmerged AbstractPPL branch --- test/Project.toml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/test/Project.toml b/test/Project.toml index afecba1c4..c9c1a6478 100644 --- a/test/Project.toml +++ b/test/Project.toml @@ -50,3 +50,6 @@ ReverseDiff = "1" StableRNGs = "1" Zygote = "0.6, 0.7" julia = "1.10" + +[sources] +AbstractPPL = {url = "https://github.com/TuringLang/AbstractPPL.jl", rev = "py/hasgetvalue"} From a19c9a6fec272877317734a4a454a3fbb874698b Mon Sep 17 00:00:00 2001 From: Penelope Yong Date: Wed, 9 Jul 2025 20:53:45 +0100 Subject: [PATCH 2/8] Remove code that was moved to AbstractPPL --- Project.toml | 3 + src/utils.jl | 193 --------------------------------------------------- 2 files changed, 3 insertions(+), 193 deletions(-) diff --git a/Project.toml b/Project.toml index c23845b8c..5d9059be9 100644 --- a/Project.toml +++ b/Project.toml @@ -75,3 +75,6 @@ Requires = "1" Statistics = "1" Test = "1.6" julia = "1.10.8" + +[sources] +AbstractPPL = {url = "https://github.com/TuringLang/AbstractPPL.jl", rev = "py/hasgetvalue"} diff --git a/src/utils.jl b/src/utils.jl index 0f4d98b11..af2891a2b 100644 --- a/src/utils.jl +++ b/src/utils.jl @@ -751,199 +751,6 @@ function unflatten(original::AbstractDict, x::AbstractVector) return D(zip(keys(original), unflatten(collect(values(original)), x))) end -# TODO: Move `getvalue` and `hasvalue` to AbstractPPL.jl. -""" - getvalue(vals, vn::VarName) - -Return the value(s) in `vals` represented by `vn`. - -Note that this method is different from `getindex`. See examples below. - -# Examples - -For `NamedTuple`: - -```jldoctest -julia> vals = (x = [1.0],); - -julia> DynamicPPL.getvalue(vals, @varname(x)) # same as `getindex` -1-element Vector{Float64}: - 1.0 - -julia> DynamicPPL.getvalue(vals, @varname(x[1])) # different from `getindex` -1.0 - -julia> DynamicPPL.getvalue(vals, @varname(x[2])) -ERROR: BoundsError: attempt to access 1-element Vector{Float64} at index [2] -[...] -``` - -For `AbstractDict`: - -```jldoctest -julia> vals = Dict(@varname(x) => [1.0]); - -julia> DynamicPPL.getvalue(vals, @varname(x)) # same as `getindex` -1-element Vector{Float64}: - 1.0 - -julia> DynamicPPL.getvalue(vals, @varname(x[1])) # different from `getindex` -1.0 - -julia> DynamicPPL.getvalue(vals, @varname(x[2])) -ERROR: BoundsError: attempt to access 1-element Vector{Float64} at index [2] -[...] -``` - -In the `AbstractDict` case we can also have keys such as `v[1]`: - -```jldoctest -julia> vals = Dict(@varname(x[1]) => [1.0,]); - -julia> DynamicPPL.getvalue(vals, @varname(x[1])) # same as `getindex` -1-element Vector{Float64}: - 1.0 - -julia> DynamicPPL.getvalue(vals, @varname(x[1][1])) # different from `getindex` -1.0 - -julia> DynamicPPL.getvalue(vals, @varname(x[1][2])) -ERROR: BoundsError: attempt to access 1-element Vector{Float64} at index [2] -[...] - -julia> DynamicPPL.getvalue(vals, @varname(x[2][1])) -ERROR: KeyError: key x[2][1] not found -[...] -``` -""" -getvalue(vals::NamedTuple, vn::VarName) = get(vals, vn) -getvalue(vals::AbstractDict, vn::VarName) = nested_getindex(vals, vn) - -""" - hasvalue(vals, vn::VarName) - -Determine whether `vals` has a mapping for a given `vn`, as compatible with [`getvalue`](@ref). - -# Examples -With `x` as a `NamedTuple`: - -```jldoctest -julia> DynamicPPL.hasvalue((x = 1.0, ), @varname(x)) -true - -julia> DynamicPPL.hasvalue((x = 1.0, ), @varname(x[1])) -false - -julia> DynamicPPL.hasvalue((x = [1.0],), @varname(x)) -true - -julia> DynamicPPL.hasvalue((x = [1.0],), @varname(x[1])) -true - -julia> DynamicPPL.hasvalue((x = [1.0],), @varname(x[2])) -false -``` - -With `x` as a `AbstractDict`: - -```jldoctest -julia> DynamicPPL.hasvalue(Dict(@varname(x) => 1.0, ), @varname(x)) -true - -julia> DynamicPPL.hasvalue(Dict(@varname(x) => 1.0, ), @varname(x[1])) -false - -julia> DynamicPPL.hasvalue(Dict(@varname(x) => [1.0]), @varname(x)) -true - -julia> DynamicPPL.hasvalue(Dict(@varname(x) => [1.0]), @varname(x[1])) -true - -julia> DynamicPPL.hasvalue(Dict(@varname(x) => [1.0]), @varname(x[2])) -false -``` - -In the `AbstractDict` case we can also have keys such as `v[1]`: - -```jldoctest -julia> vals = Dict(@varname(x[1]) => [1.0,]); - -julia> DynamicPPL.hasvalue(vals, @varname(x[1])) # same as `haskey` -true - -julia> DynamicPPL.hasvalue(vals, @varname(x[1][1])) # different from `haskey` -true - -julia> DynamicPPL.hasvalue(vals, @varname(x[1][2])) -false - -julia> DynamicPPL.hasvalue(vals, @varname(x[2][1])) -false -``` -""" -function hasvalue(vals::NamedTuple, vn::VarName{sym}) where {sym} - # LHS: Ensure that `nt` indeed has the property we want. - # RHS: Ensure that the optic can view into `nt`. - return haskey(vals, sym) && canview(getoptic(vn), getproperty(vals, sym)) -end - -# For `dictlike` we need to check wether `vn` is "immediately" present, or -# if some ancestor of `vn` is present in `dictlike`. -function hasvalue(vals::AbstractDict, vn::VarName) - # First we check if `vn` is present as is. - haskey(vals, vn) && return true - - # If `vn` is not present, we check any parent-varnames by attempting - # to split the optic into the key / `parent` and the extraction optic / `child`. - # If `issuccess` is `true`, we found such a split, and hence `vn` is present. - parent, child, issuccess = splitoptic(getoptic(vn)) do optic - o = optic === nothing ? identity : optic - haskey(vals, VarName{getsym(vn)}(o)) - end - # When combined with `VarInfo`, `nothing` is equivalent to `identity`. - keyoptic = parent === nothing ? identity : parent - - # Return early if no such split could be found. - issuccess || return false - - # At this point we just need to check that we `canview` the value. - value = vals[VarName{getsym(vn)}(keyoptic)] - - return canview(child, value) -end - -""" - nested_getindex(values::AbstractDict, vn::VarName) - -Return value corresponding to `vn` in `values` by also looking -in the the actual values of the dict. -""" -function nested_getindex(values::AbstractDict, vn::VarName) - maybeval = get(values, vn, nothing) - if maybeval !== nothing - return maybeval - end - - # Split the optic into the key / `parent` and the extraction optic / `child`. - parent, child, issuccess = splitoptic(getoptic(vn)) do optic - o = optic === nothing ? identity : optic - haskey(values, VarName{getsym(vn)}(o)) - end - # When combined with `VarInfo`, `nothing` is equivalent to `identity`. - keyoptic = parent === nothing ? identity : parent - - # If we found a valid split, then we can extract the value. - if !issuccess - # At this point we just throw an error since the key could not be found. - throw(KeyError(vn)) - end - - # TODO: Should we also check that we `canview` the extracted `value` - # rather than just let it fail upon `get` call? - value = values[VarName{getsym(vn)}(keyoptic)] - return child(value) -end - """ update_values!!(vi::AbstractVarInfo, vals::NamedTuple, vns) From f00879bec599ebf0dea9c95428730a0d926d83b3 Mon Sep 17 00:00:00 2001 From: Penelope Yong Date: Wed, 9 Jul 2025 22:13:22 +0100 Subject: [PATCH 3/8] Remove Dictionaries with Any key type --- src/DynamicPPL.jl | 2 +- src/model.jl | 12 ++++++++---- src/simple_varinfo.jl | 8 ++++---- src/test_utils/varinfo.jl | 2 +- src/values_as_in_model.jl | 4 ++-- src/varnamedvector.jl | 2 +- test/runtests.jl | 3 +++ test/simple_varinfo.jl | 2 +- test/varinfo.jl | 12 +++++------- 9 files changed, 26 insertions(+), 21 deletions(-) diff --git a/src/DynamicPPL.jl b/src/DynamicPPL.jl index 69e489ce6..4c2f0bd00 100644 --- a/src/DynamicPPL.jl +++ b/src/DynamicPPL.jl @@ -23,7 +23,7 @@ using DocStringExtensions using Random: Random # For extending -import AbstractPPL: predict +import AbstractPPL: predict, hasvalue, getvalue # TODO: Remove these when it's possible. import Bijectors: link, invlink diff --git a/src/model.jl b/src/model.jl index 93e77eaec..72a7ac294 100644 --- a/src/model.jl +++ b/src/model.jl @@ -981,7 +981,11 @@ Base.nameof(model::Model{<:Function}) = nameof(model.f) Generate a sample of type `T` from the prior distribution of the `model`. """ function Base.rand(rng::Random.AbstractRNG, ::Type{T}, model::Model) where {T} - x = last(evaluate_and_sample!!(rng, model, SimpleVarInfo{Float64}(OrderedDict()))) + x = last( + evaluate_and_sample!!( + rng, model, SimpleVarInfo{Float64}(OrderedDict{VarName,Any}()) + ), + ) return values_as(x, T) end @@ -1028,7 +1032,7 @@ julia> logjoint(demo_model([1., 2.]), chain); function logjoint(model::Model, chain::AbstractMCMC.AbstractChains) var_info = VarInfo(model) # extract variables info from the model map(Iterators.product(1:size(chain, 1), 1:size(chain, 3))) do (iteration_idx, chain_idx) - argvals_dict = OrderedDict( + argvals_dict = OrderedDict{VarName,Any}( vn_parent => values_from_chain(var_info, vn_parent, chain, chain_idx, iteration_idx) for vn_parent in keys(var_info) @@ -1082,7 +1086,7 @@ julia> logprior(demo_model([1., 2.]), chain); function logprior(model::Model, chain::AbstractMCMC.AbstractChains) var_info = VarInfo(model) # extract variables info from the model map(Iterators.product(1:size(chain, 1), 1:size(chain, 3))) do (iteration_idx, chain_idx) - argvals_dict = OrderedDict( + argvals_dict = OrderedDict{VarName,Any}( vn_parent => values_from_chain(var_info, vn_parent, chain, chain_idx, iteration_idx) for vn_parent in keys(var_info) @@ -1136,7 +1140,7 @@ julia> loglikelihood(demo_model([1., 2.]), chain); function Distributions.loglikelihood(model::Model, chain::AbstractMCMC.AbstractChains) var_info = VarInfo(model) # extract variables info from the model map(Iterators.product(1:size(chain, 1), 1:size(chain, 3))) do (iteration_idx, chain_idx) - argvals_dict = OrderedDict( + argvals_dict = OrderedDict{VarName,Any}( vn_parent => values_from_chain(var_info, vn_parent, chain, chain_idx, iteration_idx) for vn_parent in keys(var_info) diff --git a/src/simple_varinfo.jl b/src/simple_varinfo.jl index ddc3275ae..019f9cbc8 100644 --- a/src/simple_varinfo.jl +++ b/src/simple_varinfo.jl @@ -62,7 +62,7 @@ ERROR: type NamedTuple has no field x [...] julia> # If one does not know the varnames, we can use a `OrderedDict` instead. - _, vi = DynamicPPL.evaluate_and_sample!!(rng, m, SimpleVarInfo{Float64}(OrderedDict())); + _, vi = DynamicPPL.evaluate_and_sample!!(rng, m, SimpleVarInfo{Float64}(OrderedDict{VarName,Any}())); julia> # (✓) Sort of fast, but only possible at runtime. vi[@varname(x[1])] @@ -107,7 +107,7 @@ julia> any(xs .< 0) # (✓) Positive probability mass on negative numbers! true julia> # And with `OrderedDict` of course! - _, vi = DynamicPPL.evaluate_and_sample!!(rng, m, DynamicPPL.settrans!!(SimpleVarInfo(OrderedDict()), true)); + _, vi = DynamicPPL.evaluate_and_sample!!(rng, m, DynamicPPL.settrans!!(SimpleVarInfo(OrderedDict{VarName,Any}()), true)); julia> vi[@varname(x)] # (✓) -∞ < x < ∞ 0.6225185067787314 @@ -206,7 +206,7 @@ end function SimpleVarInfo(values) return SimpleVarInfo{LogProbType}(values) end -function SimpleVarInfo(values::Union{<:NamedTuple,<:AbstractDict}) +function SimpleVarInfo(values::Union{<:NamedTuple,<:AbstractDict{<:VarName}}) return if isempty(values) # Can't infer from values, so we just use default. SimpleVarInfo{LogProbType}(values) @@ -258,7 +258,7 @@ function SimpleVarInfo{T}(vi::NTVarInfo, ::Type{D}) where {T<:Real,D} end function untyped_simple_varinfo(model::Model) - varinfo = SimpleVarInfo(OrderedDict()) + varinfo = SimpleVarInfo(OrderedDict{VarName,Any}()) return last(evaluate_and_sample!!(model, varinfo)) end diff --git a/src/test_utils/varinfo.jl b/src/test_utils/varinfo.jl index 542fc17fc..26e2aa7ca 100644 --- a/src/test_utils/varinfo.jl +++ b/src/test_utils/varinfo.jl @@ -34,7 +34,7 @@ function setup_varinfos( # SimpleVarInfo svi_typed = SimpleVarInfo(example_values) - svi_untyped = SimpleVarInfo(OrderedDict()) + svi_untyped = SimpleVarInfo(OrderedDict{VarName,Any}()) svi_vnv = SimpleVarInfo(DynamicPPL.VarNamedVector()) varinfos = map(( diff --git a/src/values_as_in_model.jl b/src/values_as_in_model.jl index 4922ddbb0..a10141dec 100644 --- a/src/values_as_in_model.jl +++ b/src/values_as_in_model.jl @@ -12,12 +12,12 @@ $(TYPEDFIELDS) """ struct ValuesAsInModelAccumulator <: AbstractAccumulator "values that are extracted from the model" - values::OrderedDict + values::OrderedDict{<:VarName} "whether to extract variables on the LHS of :=" include_colon_eq::Bool end function ValuesAsInModelAccumulator(include_colon_eq) - return ValuesAsInModelAccumulator(OrderedDict(), include_colon_eq) + return ValuesAsInModelAccumulator(OrderedDict{VarName,Any}(), include_colon_eq) end accumulator_name(::Type{<:ValuesAsInModelAccumulator}) = :ValuesAsInModel diff --git a/src/varnamedvector.jl b/src/varnamedvector.jl index 965db96d5..5de0874c9 100644 --- a/src/varnamedvector.jl +++ b/src/varnamedvector.jl @@ -1482,7 +1482,7 @@ function values_as(vnv::VarNamedVector, ::Type{D}) where {D<:AbstractDict} end # See the docstring of `getvalue` for the semantics of `hasvalue` and `getvalue`, and how -# they differ from `haskey` and `getindex`. They can be found in src/utils.jl. +# they differ from `haskey` and `getindex`. They can be found in AbstractPPL.jl. # TODO(mhauru) This is tricky to implement in the general case, and the below implementation # only covers some simple cases. It's probably sufficient in most situations though. diff --git a/test/runtests.jl b/test/runtests.jl index c60c06786..e6eb42673 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -27,6 +27,9 @@ using LinearAlgebra # Diagonal using JET: JET +# need to call this to get the AbstractPPL I think +Pkg.update() + using Combinatorics: combinations using OrderedCollections: OrderedSet diff --git a/test/simple_varinfo.jl b/test/simple_varinfo.jl index e300c651e..2f080e66b 100644 --- a/test/simple_varinfo.jl +++ b/test/simple_varinfo.jl @@ -90,7 +90,7 @@ DynamicPPL.TestUtils.DEMO_MODELS values_constrained = DynamicPPL.TestUtils.rand_prior_true(model) @testset "$(typeof(vi))" for vi in ( - SimpleVarInfo(Dict()), + SimpleVarInfo(Dict{VarName,Any}()), SimpleVarInfo(values_constrained), SimpleVarInfo(DynamicPPL.VarNamedVector()), DynamicPPL.typed_varinfo(model), diff --git a/test/varinfo.jl b/test/varinfo.jl index 75868eb66..e1cb56135 100644 --- a/test/varinfo.jl +++ b/test/varinfo.jl @@ -110,7 +110,7 @@ end test_base(VarInfo()) test_base(DynamicPPL.typed_varinfo(VarInfo())) test_base(SimpleVarInfo()) - test_base(SimpleVarInfo(Dict())) + test_base(SimpleVarInfo(Dict{VarName,Any}())) test_base(SimpleVarInfo(DynamicPPL.VarNamedVector())) end @@ -604,8 +604,7 @@ end ## `SimpleVarInfo{<:Dict}` vi = DynamicPPL.settrans!!(SimpleVarInfo(Dict()), true) - # Sample in unconstrained space. - vi = last(DynamicPPL.evaluate_and_sample!!(model, vi)) + vi = DynamicPPL.settrans!!(SimpleVarInfo(Dict{VarName,Any}()), true) f = DynamicPPL.from_linked_internal_transform(vi, vn, dist) x = f(DynamicPPL.getindex_internal(vi, vn)) @test getlogjoint(vi) ≈ Bijectors.logpdf_with_trans(dist, x, true) @@ -750,11 +749,10 @@ end model, (; x=1.0), (@varname(x),); include_threadsafe=true ) @testset "$(short_varinfo_name(varinfo))" for varinfo in varinfos - # Skip the severely inconcrete `SimpleVarInfo` types, since checking for type + # Skip the inconcrete `SimpleVarInfo` types, since checking for type # stability for them doesn't make much sense anyway. - if varinfo isa SimpleVarInfo{OrderedDict{Any,Any}} || - varinfo isa - DynamicPPL.ThreadSafeVarInfo{<:SimpleVarInfo{OrderedDict{Any,Any}}} + if varinfo isa SimpleVarInfo{<:AbstractDict} || + varinfo isa DynamicPPL.ThreadSafeVarInfo{<:SimpleVarInfo{<:AbstractDict}} continue end @inferred DynamicPPL.unflatten(varinfo, varinfo[:]) From af7c6fc241e4170eba8bfc7d907e8c01f5258b6b Mon Sep 17 00:00:00 2001 From: Penelope Yong Date: Wed, 9 Jul 2025 22:46:56 +0100 Subject: [PATCH 4/8] Fix bad merge conflict resolution --- test/varinfo.jl | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/test/varinfo.jl b/test/varinfo.jl index e1cb56135..7f4c2daad 100644 --- a/test/varinfo.jl +++ b/test/varinfo.jl @@ -603,8 +603,9 @@ end @test getlogjoint(vi) ≈ Bijectors.logpdf_with_trans(dist, x, true) ## `SimpleVarInfo{<:Dict}` - vi = DynamicPPL.settrans!!(SimpleVarInfo(Dict()), true) vi = DynamicPPL.settrans!!(SimpleVarInfo(Dict{VarName,Any}()), true) + # Sample in unconstrained space. + vi = last(DynamicPPL.evaluate_and_sample!!(model, vi)) f = DynamicPPL.from_linked_internal_transform(vi, vn, dist) x = f(DynamicPPL.getindex_internal(vi, vn)) @test getlogjoint(vi) ≈ Bijectors.logpdf_with_trans(dist, x, true) From 21cf5687e5b109191b890baa13840432650a43fa Mon Sep 17 00:00:00 2001 From: Penelope Yong Date: Wed, 9 Jul 2025 23:02:18 +0100 Subject: [PATCH 5/8] Fix doctests --- src/simple_varinfo.jl | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/simple_varinfo.jl b/src/simple_varinfo.jl index 019f9cbc8..0dc2415ca 100644 --- a/src/simple_varinfo.jl +++ b/src/simple_varinfo.jl @@ -70,11 +70,11 @@ julia> # (✓) Sort of fast, but only possible at runtime. julia> # In addtion, we can only access varnames as they appear in the model! vi[@varname(x)] -ERROR: KeyError: key x not found +ERROR: getvalue: x was not found in the values provided [...] julia> vi[@varname(x[1:2])] -ERROR: KeyError: key x[1:2] not found +ERROR: getvalue: x[1:2] was not found in the values provided [...] ``` @@ -177,11 +177,11 @@ julia> svi_dict[@varname(m.a[1])] 1.0 julia> svi_dict[@varname(m.a[2])] -ERROR: BoundsError: attempt to access 1-element Vector{Float64} at index [2] +ERROR: getvalue: m.a[2] was not found in the values provided [...] julia> svi_dict[@varname(m.b)] -ERROR: type NamedTuple has no field b +ERROR: getvalue: m.b was not found in the values provided [...] ``` """ From f0e686f15bc3a4f0310afa817e1bdf37a45d54a7 Mon Sep 17 00:00:00 2001 From: Penelope Yong Date: Wed, 16 Jul 2025 17:54:15 +0100 Subject: [PATCH 6/8] Point to AbstractPPL@0.13 This reverts commit 709dc9ecff1ed7cde441447ca6a6108f182a219c. --- Project.toml | 5 +---- test/Project.toml | 5 +---- 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/Project.toml b/Project.toml index 5d9059be9..1f37515ab 100644 --- a/Project.toml +++ b/Project.toml @@ -47,7 +47,7 @@ DynamicPPLMooncakeExt = ["Mooncake"] [compat] ADTypes = "1" AbstractMCMC = "5" -AbstractPPL = "0.11, 0.12" +AbstractPPL = "0.13" Accessors = "0.1" BangBang = "0.4.1" Bijectors = "0.13.18, 0.14, 0.15" @@ -75,6 +75,3 @@ Requires = "1" Statistics = "1" Test = "1.6" julia = "1.10.8" - -[sources] -AbstractPPL = {url = "https://github.com/TuringLang/AbstractPPL.jl", rev = "py/hasgetvalue"} diff --git a/test/Project.toml b/test/Project.toml index c9c1a6478..6da3786f5 100644 --- a/test/Project.toml +++ b/test/Project.toml @@ -30,7 +30,7 @@ Zygote = "e88e6eb3-aa80-5325-afca-941959d7151f" [compat] ADTypes = "1" AbstractMCMC = "5" -AbstractPPL = "0.11, 0.12" +AbstractPPL = "0.13" Accessors = "0.1" Aqua = "0.8" Bijectors = "0.15.1" @@ -50,6 +50,3 @@ ReverseDiff = "1" StableRNGs = "1" Zygote = "0.6, 0.7" julia = "1.10" - -[sources] -AbstractPPL = {url = "https://github.com/TuringLang/AbstractPPL.jl", rev = "py/hasgetvalue"} From e4060688c8241ce537c2f6caf1e78fa40bb176fd Mon Sep 17 00:00:00 2001 From: Penelope Yong Date: Wed, 16 Jul 2025 17:56:30 +0100 Subject: [PATCH 7/8] Fix doctests --- src/simple_varinfo.jl | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/simple_varinfo.jl b/src/simple_varinfo.jl index 0dc2415ca..df3ba2b75 100644 --- a/src/simple_varinfo.jl +++ b/src/simple_varinfo.jl @@ -70,11 +70,11 @@ julia> # (✓) Sort of fast, but only possible at runtime. julia> # In addtion, we can only access varnames as they appear in the model! vi[@varname(x)] -ERROR: getvalue: x was not found in the values provided +ERROR: x was not found in the dictionary provided [...] julia> vi[@varname(x[1:2])] -ERROR: getvalue: x[1:2] was not found in the values provided +ERROR: x[1:2] was not found in the dictionary provided [...] ``` @@ -177,11 +177,11 @@ julia> svi_dict[@varname(m.a[1])] 1.0 julia> svi_dict[@varname(m.a[2])] -ERROR: getvalue: m.a[2] was not found in the values provided +ERROR: m.a[2] was not found in the dictionary provided [...] julia> svi_dict[@varname(m.b)] -ERROR: getvalue: m.b was not found in the values provided +ERROR: m.b was not found in the dictionary provided [...] ``` """ From 1bc303b06a22ed48a28aef3339c9aa2f15737778 Mon Sep 17 00:00:00 2001 From: Penelope Yong Date: Wed, 16 Jul 2025 18:10:15 +0100 Subject: [PATCH 8/8] Fix docs AbstractPPL bound --- docs/Project.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/Project.toml b/docs/Project.toml index 5797a8fd1..1cd1d90d2 100644 --- a/docs/Project.toml +++ b/docs/Project.toml @@ -14,7 +14,7 @@ MCMCChains = "c7f686f2-ff18-58e9-bc7b-31028e88f75d" StableRNGs = "860ef19b-820b-49d6-a774-d7a799459cd3" [compat] -AbstractPPL = "0.11, 0.12" +AbstractPPL = "0.13" Accessors = "0.1" DataStructures = "0.18" Distributions = "0.25"