Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions usage/external-samplers/index.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -130,11 +130,11 @@ The output of both of these methods must be a tuple containing:
- a 'transition', which is essentially the 'visible output' of the sampler: this object is later used to construct an `MCMCChains.Chains`;
- a 'state', representing the current state of the sampler, which is passed to the next step of the MCMC algorithm.

Apart from this, your sampler state should also implement `Turing.Inference.getparams(model, transition)` to return the parameters of the model as a vector.
Apart from this, your sampler state should also implement `AbstractMCMC.getparams(model, state)` to return the parameters of the model as a vector.
Here, `transition` represents the first output of the `step` function.

```julia
function Turing.Inference.getparams(model::DynamicPPL.Model, state::MyTransition)
function AbstractMCMC.getparams(model::AbstractMCMC.LogDensityModel, state::MyState)
# Return a vector containing the parameters of the model.
end
```
Expand Down
Loading