The current main tracing data structure is VarInfo, which wraps either a Metadata or a NamedTuple with variable symbols as keys and Metadata objects as values. The latter is called a TypedVarInfo, since it allows for concrete types to be inferred for variables. In addition to the metadata field, VarInfo also holds logp and num_produce.
There's also SimpleVarInfo, which stores the values in a standard container like an OrderedDict or a NamedTuple, and only carries logp with it. It is more limited in its features, but sometimes faster.
A not-necessarily-exhaustive list of things that should be done under the banner of this roadmap issue:
- Remove unnecessary old features like
Selectors and Gibbs IDs
- Refactor to simplify
- Switch from
Metadata to VarNamedVector, which is simpler and has a more well-defined interface.
- Somehow generalise the types of information that
VarInfo carries, i.e. not just hard-code in logp and num_produce.
- Refactor particle Gibbs so that features of
VarInfo that only serve it can be removed.
- See if we could unify
VarInfo and SimpleVarInfo into a best of both worlds solution to further simplify the codebase
Related issues
The current main tracing data structure is
VarInfo, which wraps either aMetadataor aNamedTuplewith variable symbols as keys andMetadataobjects as values. The latter is called aTypedVarInfo, since it allows for concrete types to be inferred for variables. In addition to themetadatafield,VarInfoalso holdslogpandnum_produce.There's also
SimpleVarInfo, which stores the values in a standard container like anOrderedDictor aNamedTuple, and only carrieslogpwith it. It is more limited in its features, but sometimes faster.A not-necessarily-exhaustive list of things that should be done under the banner of this roadmap issue:
Selectors and Gibbs IDsMetadatatoVarNamedVector, which is simpler and has a more well-defined interface.VarInfocarries, i.e. not just hard-code inlogpandnum_produce.VarInfothat only serve it can be removed.VarInfoandSimpleVarInfointo a best of both worlds solution to further simplify the codebaseRelated issues
assumeanddot_assumeDynamicPPL.jl#682VarInfoin favour ofSimpleVarInfoDynamicPPL.jl#416