-
Couldn't load subscription status.
- Fork 106
Description
There's surprisingly little (or no?) documentation about what you can do with a model. For example, you can execute a model with (::Model)(), get samples with rand(::Model), ...
Also, conceptually, I don't think there's any documentation that says conceptually what a VarInfo is. You just kind of pick it up by realising that it gets carried around everywhere.
I think that this sort of stuff is super important for anybody trying to write a DynamicPPLExt but right now there's no way to get into it apart from reading DynamicPPL source code.
Broad outline:
- Things you can do to a model: return values, rand, (... not sure if there's anything else here)
- Fundamentally, all of the above use
DynamicPPL.evaluate!!under the hood, this is the 'central function of DynamicPPL'. - An intro to VarInfo, its role as 'model trace' / or I prefer to think of it as execution state
- How do you populate a new VarInfo: with
DynamicPPL.init!! -
unflattenandLogDensityFunction
This page would probably stay away from the internal structure of VarInfo and things like typed/untyped. Firstly, those topics may change in the medium term. Secondly, those are probably of less interest anyway since those are fairly internal to DynamicPPL. I suspect many developers don't need to go beyond the points above.
For a follow-up, see #664.