TuringLang / AbstractMCMC.jl

Abstract types and interfaces for Markov chain Monte Carlo methods
https://turinglang.org/AbstractMCMC.jl
MIT License
87 stars 18 forks source link

Docs typo: isdone signature #90

Closed sefffal closed 2 years ago

sefffal commented 2 years ago

Hello, The docstring at https://github.com/TuringLang/AbstractMCMC.jl/blob/56431bd4298bac6ad324dd47dc3162cf49c45626/src/sample.jl#L39-L50

says:

The function `isdone` has the signature
```julia
isdone(rng, model, sampler, samples, iteration; kwargs...)

But it actually must have the signature !isdone(rng, model, sampler, samples, state, i; progress=progress, kwargs...)

See line: https://github.com/TuringLang/AbstractMCMC.jl/blob/56431bd4298bac6ad324dd47dc3162cf49c45626/src/sample.jl#L238

Normally I would make a PR, but for such a small change I thought I'd just flag it here. Let me know if you'd prefer otherwise. Thanks!

devmotion commented 2 years ago

Thanks! Seems this was not updated when the state argument was added in https://github.com/TuringLang/AbstractMCMC.jl/pull/68.