From 8edd91fe72a635a9d2b90beec16fff10db57ff04 Mon Sep 17 00:00:00 2001 From: Nicki Skafte Date: Wed, 6 Aug 2025 09:06:08 +0200 Subject: [PATCH] exclude int's from formatting --- src/lightning/pytorch/callbacks/progress/rich_progress.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lightning/pytorch/callbacks/progress/rich_progress.py b/src/lightning/pytorch/callbacks/progress/rich_progress.py index ff092fa99d825..b82a38963b5b2 100644 --- a/src/lightning/pytorch/callbacks/progress/rich_progress.py +++ b/src/lightning/pytorch/callbacks/progress/rich_progress.py @@ -184,7 +184,7 @@ def render(self, task: "Task") -> Text: def _generate_metrics_texts(self) -> Generator[str, None, None]: for name, value in self._metrics.items(): - if not isinstance(value, str): + if not isinstance(value, (str, int)): value = f"{value:{self._metrics_format}}" yield f"{name}: {value}"