From d75cf71b0c0107d877dc121f33b15376e5995e65 Mon Sep 17 00:00:00 2001 From: David Widmann Date: Wed, 19 Jan 2022 17:21:34 +0100 Subject: [PATCH 1/2] Fix signature of `isdone` in docstring --- src/sample.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sample.jl b/src/sample.jl index df76caf0..247cfd48 100644 --- a/src/sample.jl +++ b/src/sample.jl @@ -44,7 +44,7 @@ convergence criterion `isdone` returns `true`, and return the samples. The function `isdone` has the signature ```julia -isdone(rng, model, sampler, samples, iteration; kwargs...) +isdone(rng, model, sampler, samples, state, iteration; kwargs...) ``` and should return `true` when sampling should end, and `false` otherwise. """ From 23a39d328678c6fbe32bc92bc5e3e1baaf4c7744 Mon Sep 17 00:00:00 2001 From: David Widmann Date: Wed, 19 Jan 2022 17:23:39 +0100 Subject: [PATCH 2/2] Update sample.jl --- src/sample.jl | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/sample.jl b/src/sample.jl index 247cfd48..9d48df39 100644 --- a/src/sample.jl +++ b/src/sample.jl @@ -46,7 +46,8 @@ The function `isdone` has the signature ```julia isdone(rng, model, sampler, samples, state, iteration; kwargs...) ``` -and should return `true` when sampling should end, and `false` otherwise. +where `state` and `iteration` are the current state and iteration of the sampler, respectively. +It should return `true` when sampling should end, and `false` otherwise. """ function StatsBase.sample( rng::Random.AbstractRNG,