You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
After recent developments, we now support slightly more complex structures ending up in the chains.
Unfortunately, this means that we're now deviating from the what is expected by much functionality in DynamicPPL, e.g. generated_quantities, see for example #2073.
There are ways we can improve this on the side of DynamicPPL, e.g. by introducing a nested_getindex which can handle scenarios such as
and similarly a nested_setindex!, which sacrifice performance for flexibility (we'll still keep the existing getindex implementations which will be much faster).
But even something like the above won't be sufficient to fix all our interactions with MCMCChains.Chains objects because at this point everything has been converting into Symbol and so the structure, e.g. is x.L meant to be VarName{:x}(@lens(_.L)) or VarName{Symbol("x.L")) (can easily occur with sub-models using prefixing), has been completely lost.
Unfortunately, due to the reliance on AxisArrays.jl for the underlying storage, we cannot just use VarName as keys for the Chains, as things currently stand.
Sooo we need to do something. There are a few immediate ideas:
Make MCMCChains.Chains more flexible.
Just add a mapping from varname to symbol to, say, the info field of Chains and define getindex for varname using this.
???
The text was updated successfully, but these errors were encountered:
After recent developments, we now support slightly more complex structures ending up in the chains.
Unfortunately, this means that we're now deviating from the what is expected by much functionality in DynamicPPL, e.g.
generated_quantities
, see for example #2073.There are ways we can improve this on the side of DynamicPPL, e.g. by introducing a
nested_getindex
which can handle scenarios such asand similarly a
nested_setindex!
, which sacrifice performance for flexibility (we'll still keep the existinggetindex
implementations which will be much faster).But even something like the above won't be sufficient to fix all our interactions with
MCMCChains.Chains
objects because at this point everything has been converting intoSymbol
and so the structure, e.g. isx.L
meant to beVarName{:x}(@lens(_.L))
orVarName{Symbol("x.L"))
(can easily occur with sub-models using prefixing), has been completely lost.Unfortunately, due to the reliance on AxisArrays.jl for the underlying storage, we cannot just use
VarName
as keys for theChains
, as things currently stand.Sooo we need to do something. There are a few immediate ideas:
MCMCChains.Chains
more flexible.varname
tosymbol
to, say, theinfo
field ofChains
and definegetindex
forvarname
using this.The text was updated successfully, but these errors were encountered: