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
Copy file name to clipboardExpand all lines: docs/src/api.md
+6-1Lines changed: 6 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -456,6 +456,11 @@ AbstractPPL.evaluate!!
456
456
457
457
This method mutates the `varinfo` used for execution.
458
458
By default, it does not perform any actual sampling: it only evaluates the model using the values of the variables that are already in the `varinfo`.
459
+
To perform sampling, you can either wrap `model.context` in a `SamplingContext`, or use this convenience method:
460
+
461
+
```@docs
462
+
DynamicPPL.evaluate_and_sample!!
463
+
```
459
464
460
465
The behaviour of a model execution can be changed with evaluation contexts, which are a field of the model.
461
466
Contexts are subtypes of `AbstractPPL.AbstractContext`.
@@ -514,7 +519,7 @@ The default implementation of [`Sampler`](@ref) uses the following unexported fu
514
519
```@docs
515
520
DynamicPPL.initialstep
516
521
DynamicPPL.loadstate
517
-
DynamicPPL.initialsampler
522
+
DynamicPPL.init_strategy
518
523
```
519
524
520
525
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`.
0 commit comments