Skip to content

Commit f4ccbd5

Browse files
Allow all permutations of arguments to progressbar
1 parent 741cf36 commit f4ccbd5

File tree

1 file changed

+9
-7
lines changed

1 file changed

+9
-7
lines changed

pymc/util.py

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -709,30 +709,32 @@ def __init__(self, step_method, chains, draws, tune, progressbar, progressbar_th
709709
show_progress = True
710710

711711
match progressbar:
712-
case True:
713-
show_progress = True
714712
case False:
715713
show_progress = False
716714
case "combined":
717715
self.combined_progress = True
718716
case "chain":
719717
self.combined_progress = False
720-
case "combined+full":
718+
case "simple":
719+
self.full_stats = False
720+
case "full":
721+
self.full_stats = True
722+
case "combined+full" | "full+combined":
721723
self.combined_progress = True
722724
self.full_stats = True
723-
case "combined+simple":
725+
case "combined+simple" | "simple+combined":
724726
self.combined_progress = True
725727
self.full_stats = False
726-
case "chain+full":
728+
case "chain+full" | "full+chain":
727729
self.combined_progress = False
728730
self.full_stats = True
729-
case "chain+simple":
731+
case "chain+simple" | "simple+chain":
730732
self.combined_progress = False
731733
self.full_stats = False
732734
case _:
733735
raise ValueError(
734736
"Invalid value for `progressbar`. Valid values are True (default), False (no progress bar), "
735-
"or one of 'combined', 'chain', 'combined+full', 'combined+simple', 'chain+full', 'chain+simple'."
737+
"one of 'combined', 'chain', 'simple', 'full', or a '+' delimited pair of two of these values."
736738
)
737739

738740
progress_columns, progress_stats = step_method._progressbar_config(chains)

0 commit comments

Comments
 (0)