diff --git a/nncf/common/logging/track_progress.py b/nncf/common/logging/track_progress.py index 9827bc72085..b852c372c87 100644 --- a/nncf/common/logging/track_progress.py +++ b/nncf/common/logging/track_progress.py @@ -25,15 +25,15 @@ from rich.style import StyleType from rich.text import Text +INTEL_BLUE_COLOR = "#0068b5" + class IterationsColumn(ProgressColumn): def render(self, task: Task) -> Text: if task.total is None: return Text("") text = f"{int(task.completed)}/{int(task.total)}" - if task.finished: - return Text(text, style="progress.elapsed") - return Text(text, style="progress.remaining") + return Text(text, style=INTEL_BLUE_COLOR) class SeparatorColumn(ProgressColumn): @@ -47,6 +47,18 @@ def render(self, task: Task) -> Text: return Text("•") +class TimeElapsedColumnWithStyle(TimeElapsedColumn): + def render(self, task: "Task") -> Text: + text = super().render(task) + return Text(text._text[0], style=INTEL_BLUE_COLOR) # pylint: disable=protected-access + + +class TimeRemainingColumnWithStyle(TimeRemainingColumn): + def render(self, task: "Task") -> Text: + text = super().render(task) + return Text(text._text[0], style=INTEL_BLUE_COLOR) # pylint: disable=protected-access + + class track: def __init__( self, @@ -105,13 +117,14 @@ def __init__( complete_style=complete_style, finished_style=finished_style, pulse_style=pulse_style, + bar_width=None, ), TaskProgressColumn(show_speed=show_speed), IterationsColumn(), SeparatorColumn(), - TimeElapsedColumn(), + TimeElapsedColumnWithStyle(), SeparatorColumn(disable_if_no_total=True), # disable because time remaining will be empty - TimeRemainingColumn(), + TimeRemainingColumnWithStyle(), ) )