Skip to content

Commit

Permalink
No more purple
Browse files Browse the repository at this point in the history
  • Loading branch information
jessegrabowski committed Jan 7, 2025
1 parent 463a0e1 commit f672f4d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
1 change: 0 additions & 1 deletion pymc/sampling/parallel.py
Original file line number Diff line number Diff line change
Expand Up @@ -439,7 +439,6 @@ def __init__(
DivergenceBarColumn(
table_column=Column("Progress", ratio=2),
diverging_color="tab:red",
diverging_finished_color="tab:purple",
complete_style=Style.parse("rgb(31,119,180)"), # tab:blue
finished_style=Style.parse("rgb(44,160,44)"), # tab:green
),
Expand Down
7 changes: 2 additions & 5 deletions pymc/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -664,15 +664,12 @@ def call_column(column, task):


class DivergenceBarColumn(BarColumn):
def __init__(self, *args, diverging_color="red", diverging_finished_color="purple", **kwargs):
def __init__(self, *args, diverging_color="red", **kwargs):
from matplotlib.colors import to_rgb

self.diverging_color = diverging_color
self.diverging_rgb = [int(x * 255) for x in to_rgb(self.diverging_color)]

self.diverging_finished_color = diverging_finished_color
self.diverging_finished_rgb = [int(x * 255) for x in to_rgb(self.diverging_finished_color)]

super().__init__(*args, **kwargs)

self.non_diverging_style = self.complete_style
Expand All @@ -682,7 +679,7 @@ def callbacks(self, task: "Task"):
divergences = task.fields.get("divergences", 0)
if divergences > 0:
self.complete_style = Style.parse("rgb({},{},{})".format(*self.diverging_rgb))
self.finished_style = Style.parse("rgb({},{},{})".format(*self.diverging_finished_rgb))
self.finished_style = Style.parse("rgb({},{},{})".format(*self.diverging_rgb))
else:
self.complete_style = self.non_diverging_style
self.finished_style = self.non_diverging_finished_style
Expand Down

0 comments on commit f672f4d

Please sign in to comment.