Skip to content

Commit 5fe2336

Browse files
committed
Document chain_number kwarg
1 parent d8f5ab9 commit 5fe2336

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

docs/src/api.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,8 +71,9 @@ Common keyword arguments for regular and parallel sampling are:
7171
- `progress` (default: `AbstractMCMC.PROGRESS[]` which is `true` initially): toggles progress logging. See the section on [Progress logging](#progress-logging) below for more details.
7272
- `chain_type` (default: `Any`): determines the type of the returned chain
7373
- `callback` (default: `nothing`): if `callback !== nothing`, then
74-
`callback(rng, model, sampler, sample, iteration)` is called after every sampling step,
74+
`callback(rng, model, sampler, sample, iteration; kwargs...)` is called after every sampling step,
7575
where `sample` is the most recent sample of the Markov chain and `iteration` is the current iteration
76+
- Keyword arguments `kwargs...` are passed down from the call to `sample(...)`. If you are performing multiple-chain sampling, then `kwargs` _additionally_ contains a `chain_number` keyword argument, which runs from 1 to the number of chains. This is not present when performing single-chain sampling.
7677
- `num_warmup` (default: `0`): number of "warm-up" steps to take before the first "regular" step,
7778
i.e. number of times to call [`AbstractMCMC.step_warmup`](@ref) before the first call to
7879
[`AbstractMCMC.step`](@ref).

0 commit comments

Comments
 (0)