Skip to content

Commit

Permalink
Fix local variable 'last_metrics' referenced before assignment (#852)
Browse files Browse the repository at this point in the history
Co-authored-by: Ivan Shcheklein <[email protected]>
  • Loading branch information
mluscon and shcheklein authored Dec 19, 2024
1 parent dac96b2 commit 6bce4fa
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/dvclive/monitor_system.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down

0 comments on commit 6bce4fa

Please sign in to comment.