From 6bce4fad2c2af0335990ca6edca94e871e9e90bc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20Lu=C5=A1=C4=8Don?= Date: Thu, 19 Dec 2024 05:58:03 +0100 Subject: [PATCH] Fix local variable 'last_metrics' referenced before assignment (#852) Co-authored-by: Ivan Shcheklein --- src/dvclive/monitor_system.py | 1 + 1 file changed, 1 insertion(+) diff --git a/src/dvclive/monitor_system.py b/src/dvclive/monitor_system.py index f6d26d83..363337d7 100644 --- a/src/dvclive/monitor_system.py +++ b/src/dvclive/monitor_system.py @@ -117,6 +117,7 @@ def _check_directories_to_monitor( def _monitoring_loop(self): while not self._shutdown_event.is_set(): self._metrics = {} + last_metrics = {} for _ in range(self._num_samples): try: last_metrics = self._get_metrics()