From 46bfe8ff1a3f20221d888dc7044972400266bdea Mon Sep 17 00:00:00 2001 From: Carlos Mocholi Date: Sun, 21 Feb 2021 04:03:02 +0100 Subject: [PATCH 1/2] Fix log --- pytorch_lightning/callbacks/model_checkpoint.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pytorch_lightning/callbacks/model_checkpoint.py b/pytorch_lightning/callbacks/model_checkpoint.py index 83d86b619c7c9..461c211baab12 100644 --- a/pytorch_lightning/callbacks/model_checkpoint.py +++ b/pytorch_lightning/callbacks/model_checkpoint.py @@ -564,7 +564,7 @@ def _save_top_k_checkpoints(self, trainer, pl_module, metrics): if self.check_monitor_top_k(current): self._update_best_and_save(current, epoch, step, trainer, pl_module, metrics) - elif self.verbose: + elif self.monitor is not None and self.verbose: rank_zero_info(f"Epoch {epoch:d}, step {step:d}: {self.monitor} was not in top {self.save_top_k}") def _is_valid_monitor_key(self, metrics): From a2329cb0bd96fbe5e68aede490565e1ec1fc2168 Mon Sep 17 00:00:00 2001 From: Carlos Mocholi Date: Sun, 21 Feb 2021 04:07:28 +0100 Subject: [PATCH 2/2] Update CHANGELOG --- CHANGELOG.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 55895318cba4f..0d72ad09db5ee 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -30,7 +30,10 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/). - Fixed priority of plugin/accelerator when setting distributed mode ([#6089](https://github.com/PyTorchLightning/pytorch-lightning/pull/6089)) -- Move lightning module to correct device type when using LightningDistributedWrapper ([#6070](https://github.com/PyTorchLightning/pytorch-lightning/pull/6070) +- Move lightning module to correct device type when using LightningDistributedWrapper ([#6070](https://github.com/PyTorchLightning/pytorch-lightning/pull/6070)) + + +- Do not print top-k verbose log with `ModelCheckpoint(monitor=None)` ([#6109](https://github.com/PyTorchLightning/pytorch-lightning/pull/6109)) ## [1.2.0] - 2021-02-18