Skip to content

Commit

Permalink
Revert default n_adapts value.
Browse files Browse the repository at this point in the history
  • Loading branch information
yebai authored Jul 29, 2023
1 parent 307040e commit 2bf8beb
Showing 1 changed file with 0 additions and 33 deletions.
33 changes: 0 additions & 33 deletions src/inference/Inference.jl
Original file line number Diff line number Diff line change
Expand Up @@ -178,21 +178,6 @@ function AbstractMCMC.sample(
return AbstractMCMC.sample(rng, model, Sampler(alg, model), N; kwargs...)
end

function AbstractMCMC.sample(
rng::AbstractRNG,
model::AbstractModel,
alg::ExternalSampler,
N::Integer;
kwargs...
)
# Default adaption settings for external samplers
default_n_adapts = min(div(N, 10), 1_000)
kwargs[:n_adapts] = get(kwargs, :n_adapts, default_n_adapts)
kwargs[:discard_initial] = get(kwargs, :discard_initial, default_n_adapts)

return AbstractMCMC.sample(rng, model, Sampler(alg, model), N + default_n_adapts; kwargs...)
end

function AbstractMCMC.sample(
rng::AbstractRNG,
model::AbstractModel,
Expand Down Expand Up @@ -254,24 +239,6 @@ function AbstractMCMC.sample(
kwargs...)
end

function AbstractMCMC.sample(
rng::AbstractRNG,
model::AbstractModel,
alg::ExternalSampler,
ensemble::AbstractMCMC.AbstractMCMCEnsemble,
N::Integer,
n_chains::Integer;
kwargs...
)
# Default adaption settings for external samplers
default_n_adapts = min(div(N, 10), 1_000)
kwargs[:n_adapts] = get(kwargs, :n_adapts, default_n_adapts)
kwargs[:discard_initial] = get(kwargs, :discard_initial, default_n_adapts)

return AbstractMCMC.sample(rng, model, Sampler(alg, model), ensemble, N, n_chains;
kwargs...)
end

function AbstractMCMC.sample(
rng::AbstractRNG,
model::AbstractModel,
Expand Down

0 comments on commit 2bf8beb

Please sign in to comment.