Skip to content

Commit 4d65ea0

Browse files
authored
Progress bar fix for PF (#457)
1 parent abf45b7 commit 4d65ea0

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

Diff for: pymc_extras/inference/pathfinder/pathfinder.py

+2-3
Original file line numberDiff line numberDiff line change
@@ -587,8 +587,6 @@ def bfgs_sample_sparse(
587587
# (L, N, N), (L, N, M) -> (L, N, M)
588588
+ sqrt_alpha_diag
589589
@ (
590-
# (L, N, 2J), (L, 2J, M) -> (L, N, M)
591-
# intermediate calcs below
592590
# (L, N, 2J), (L, 2J, 2J) -> (L, N, 2J)
593591
(Q @ (Lchol - IdN))
594592
# (L, 2J, N), (L, N, M) -> (L, 2J, M)
@@ -1565,8 +1563,9 @@ def multipath_pathfinder(
15651563
task,
15661564
description=desc.format(path_idx=path_idx),
15671565
completed=path_idx,
1568-
refresh=True,
15691566
)
1567+
# Ensure the progress bar visually reaches 100% and shows 'Completed'
1568+
progress.update(task, completed=num_paths, description="Completed")
15701569
except (KeyboardInterrupt, StopIteration) as e:
15711570
# if exception is raised here, MultiPathfinderResult will collect all the successful results and report the results. User is free to abort the process earlier and the results will still be collected and return az.InferenceData.
15721571
if isinstance(e, StopIteration):

0 commit comments

Comments
 (0)