Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Modernise the tracing data structure for DynamicPPL #2423

Open
mhauru opened this issue Dec 5, 2024 · 0 comments
Open

Modernise the tracing data structure for DynamicPPL #2423

mhauru opened this issue Dec 5, 2024 · 0 comments
Assignees
Labels
Milestone

Comments

@mhauru
Copy link
Member

mhauru commented Dec 5, 2024

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

@mhauru mhauru added this to the Turing v1.0.0 milestone Dec 5, 2024
@penelopeysm penelopeysm added meta About the project itself roadmap and removed meta About the project itself labels Dec 7, 2024
@mhauru mhauru self-assigned this Jan 31, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants