You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
added a bunch of docs for introduced and existing methods
Added docs for `determine_suitable_varinfo` and existing methods that should be
documented, e.g. `untyped_varinfo`, `typed_varinfo`, and `default_varinfo`
Copy file name to clipboardExpand all lines: docs/src/api.md
+20Lines changed: 20 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -243,6 +243,13 @@ AbstractVarInfo
243
243
244
244
But exactly how a [`AbstractVarInfo`](@ref) stores this information can vary.
245
245
246
+
For constructing the "default" typed and untyped varinfo types used in DynamicPPL (see [the section on varinfo design](./internals/varinfo) for more on this), we have the following two methods:
247
+
248
+
```@docs
249
+
DynamicPPL.untyped_varinfo
250
+
DynamicPPL.typed_varinfo
251
+
```
252
+
246
253
#### `VarInfo`
247
254
248
255
```@docs
@@ -403,6 +410,19 @@ DynamicPPL.loadstate
403
410
DynamicPPL.initialsampler
404
411
```
405
412
413
+
Finally, to specify which varinfo type a [`Sampler`](@ref) should use for a given [`Model`](@ref), this is specified by [`DynamicPPL.default_varinfo`](@ref) and can thus be overloaded for each `model`-`sampler` combination. This can be useful in cases where one has explicit knowledge that one type of varinfo will be more performant for the given `model` and `sampler`.
414
+
415
+
```@docs
416
+
DynamicPPL.default_varinfo
417
+
```
418
+
419
+
There is also the _experimental_[`DynamicPPL.Experimental.determine_suitable_varinfo`](@ref), which uses static checking via [JET.jl](https://github.com/aviatesk/JET.jl) to determine whether one should use [`DynamicPPL.typed_varinfo`](@ref) or [`DynamicPPL.untyped_varinfo`](@ref), depending on which supports the model:
0 commit comments