Skip to content

Commit

Permalink
Move threshold block
Browse files Browse the repository at this point in the history
  • Loading branch information
devmotion authored Mar 19, 2021
1 parent d8ddd2c commit 77807d0
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions src/sample.jl
Original file line number Diff line number Diff line change
Expand Up @@ -85,13 +85,14 @@ function mcmcsample(
N > 0 || error("the number of samples must be ≥ 1")
Ntotal = thinning * (N - 1) + discard_initial + 1

# Determine threshold values for progress logging (one update per 0.5% of progress)
if progress
threshold = Ntotal ÷ 200
next_update = threshold
end

@ifwithprogresslogger progress name=progressname begin
# Determine threshold values for progress logging
# (one update per 0.5% of progress)
if progress
threshold = Ntotal ÷ 200
next_update = threshold
end

# Obtain the initial sample and state.
sample, state = step(rng, model, sampler; kwargs...)

Expand Down

0 comments on commit 77807d0

Please sign in to comment.