Skip to content
Closed
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ uuid = "80f14c24-f653-4e6a-9b94-39d6b0f70001"
keywords = ["markov chain monte carlo", "probabilistic programming"]
license = "MIT"
desc = "A lightweight interface for common MCMC methods."
version = "5.6.1"
version = "5.7.0"

[deps]
BangBang = "198e06fe-97b7-11e9-32a5-e1d131e6ad66"
Expand Down
14 changes: 14 additions & 0 deletions src/interface.jl
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,20 @@ then `reduce(chainscat, c)` is called.
chainsstack(c) = c
chainsstack(c::AbstractVector{<:AbstractChains}) = reduce(chainscat, c)

"""
getadtype(s::AbstractSampler)
getadtype(m::AbstractModel, s::AbstractSampler)

Specify the `ADTypes.AbstractADType` to be used when sampling from model `m` using sampler `s`.

If the model is not relevant, then the implementation of AbstractSampler can
directly overload the single-argument method `getadtype(s::AbstractSampler)`.

By default, this returns `nothing`.
"""
getadtype(::AbstractSampler) = nothing
getadtype(::AbstractModel, spl::AbstractSampler) = getadtype(spl)

"""
bundle_samples(samples, model, sampler, state, chain_type[; kwargs...])

Expand Down
Loading