From 827a3d60102fc456cf4b07295118ace3c562ac22 Mon Sep 17 00:00:00 2001 From: Ross Wightman Date: Fri, 21 Jun 2019 11:57:43 -0700 Subject: [PATCH] Add current checkpoints output back to CheckpointSaver (via logger) --- timm/utils.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/timm/utils.py b/timm/utils.py index 90efdf1b..8d4418a6 100644 --- a/timm/utils.py +++ b/timm/utils.py @@ -65,6 +65,11 @@ class CheckpointSaver: self.checkpoint_files, key=lambda x: x[1], reverse=not self.decreasing) # sort in descending order if a lower metric is not better + checkpoints_str = "Current checkpoints:\n" + for c in self.checkpoint_files: + checkpoints_str += ' {}\n'.format(c) + logging.info(checkpoints_str) + if metric is not None and (self.best_metric is None or self.cmp(metric, self.best_metric)): self.best_epoch = epoch self.best_metric = metric