Skip to content

LibtaskExt: state needs to include (1) VarInfo, (2) a boolean indicating whether to resample #120

@penelopeysm

Description

@penelopeysm

# In Libtask.TapedTask.taped_globals, this extension sometimes needs to store an RNG,
# and sometimes both an RNG and other information. In Turing.jl the other information
# is a VarInfo. This struct puts those in a single struct. Note the abstract type of
# the second field. This is okay, because `get_taped_globals` needs a type assertion anyway.
struct TapedGlobals{RngType}
rng::RngType
other::Any
end

Right now the other field only stores a VarInfo. By coincidence (okay, historical design), the varinfo also contains a flag called "del" which says whether we need to resample or not (i.e. whether it's the reference particle or not).

We want to get rid of "del" from varinfo. To do so though we need to have an equivalent source of information for Turing to pick up on and thus this other field probably needs to be a tuple of Bool + AbstractVarInfo.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions