@@ -161,7 +161,10 @@ function mcmcsample(
161
161
start = time ()
162
162
local state
163
163
164
- @single_ifwithprogresslogger progress name = progressname begin
164
+ # Only create a new progress bar if progress is explicitly equal to true, i.e.
165
+ # it's not a UUID (the progress bar already exists), a channel (there's no need
166
+ # for a new progress bar), or false (no progress bar).
167
+ @ifwithprogresslogger (progress == true ) name = progressname begin
165
168
# Determine threshold values for progress logging
166
169
# (one update per 0.5% of progress)
167
170
threshold = Ntotal ÷ 200
@@ -319,7 +322,7 @@ function mcmcsample(
319
322
start = time ()
320
323
local state
321
324
322
- @single_ifwithprogresslogger progress name = progressname begin
325
+ @ifwithprogresslogger ( progress == true ) name = progressname begin
323
326
# Obtain the initial sample and state.
324
327
sample, state = if num_warmup > 0
325
328
if initial_state === nothing
@@ -456,7 +459,7 @@ function mcmcsample(
456
459
# Set up a chains vector.
457
460
chains = Vector {Any} (undef, nchains)
458
461
459
- @multi_ifwithprogresslogger progress name = progressname begin
462
+ @ifwithprogresslogger ( progress != :none ) name = progressname begin
460
463
if progress == :perchain
461
464
# This is the 'overall' progress bar. We create a channel for each
462
465
# chain to report back to when it finishes sampling.
@@ -633,7 +636,7 @@ function mcmcsample(
633
636
pool = Distributed. CachingPool (Distributed. workers ())
634
637
635
638
local chains
636
- @single_ifwithprogresslogger progress name = progressname begin
639
+ @ifwithprogresslogger ( progress == true ) name = progressname begin
637
640
# Create a channel for progress logging.
638
641
if progress
639
642
channel = Distributed. RemoteChannel (() -> Channel {Bool} (Distributed. nworkers ()))
0 commit comments