Skip to content

Modernise the tracing data structure for DynamicPPL #2423

@mhauru

Description

@mhauru

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

Metadata

Metadata

Assignees

Labels

roadmapTuring.jl meta issues

Type

No type
No fields configured for issues without a type.

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions