Skip to content

Commit a90226c

Browse files
committed
Fix progress for MCMCSerial
1 parent 3ee9979 commit a90226c

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/sample.jl

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -410,7 +410,7 @@ function mcmcsample(
410410

411411
# Create overall progress logging object (tracks number of chains completed)
412412
overall_progress_obj = ProgressMeter.Progress(
413-
nchains; desc=progressname, dt=0.01, enabled=progress
413+
nchains; desc=progressname, dt=0.0, enabled=progress
414414
)
415415
# ProgressMeter doesn't start printing until the second iteration or so. This
416416
# forces it to start printing an empty progress bar immediately.
@@ -614,7 +614,7 @@ function mcmcsample(
614614
::MCMCSerial,
615615
N::Integer,
616616
nchains::Integer;
617-
progressname="Sampling",
617+
progress=PROGRESS[],
618618
initial_params=nothing,
619619
initial_state=nothing,
620620
kwargs...,
@@ -647,7 +647,8 @@ function mcmcsample(
647647
model,
648648
sampler,
649649
N;
650-
progressname=string(progressname, " (Chain ", i, " of ", nchains, ")"),
650+
progress=progress,
651+
progressname="Chain $i/$nchains",
651652
initial_params=initial_params,
652653
initial_state=initial_state,
653654
kwargs...,

0 commit comments

Comments
 (0)