Add current checkpoints output back to CheckpointSaver (via logger)

pull/16/head v0.1-cadene
Ross Wightman 5 years ago
parent 63961b36a2
commit 827a3d6010

@ -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

Loading…
Cancel
Save