Skip to content

Commit 02f7f2b

Browse files
Update progress bar via step id
1 parent eccfa39 commit 02f7f2b

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

pymc/util.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -883,7 +883,10 @@ def update(self, chain_idx, is_last, draw, tuning, stats):
883883
if not tuning and stats and stats[0].get("diverging"):
884884
self.divergences += 1
885885

886-
self.progress_stats = self.update_stats(self.progress_stats, stats, chain_idx)
886+
step_meta = [entry["step_meta"] for entry in stats]
887+
step_id_to_stats = {meta["step_id"]: entry for meta, entry in zip(step_meta, stats)}
888+
889+
self.progress_stats = self.update_stats(self.progress_stats, step_id_to_stats, chain_idx)
887890
more_updates = (
888891
{stat: value[chain_idx] for stat, value in self.progress_stats.items()}
889892
if self.full_stats

0 commit comments

Comments
 (0)