Avoid printing ModelCheckpoint log with monitor=None and verbose=True (#6109)
This commit is contained in:
parent
1d28d11a07
commit
57215b79a0
|
@ -33,6 +33,9 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/).
|
||||||
- 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))
|
||||||
|
|
||||||
|
|
||||||
- Fixed error message for AMP + CPU incompatibility ([#6107](https://github.com/PyTorchLightning/pytorch-lightning/pull/6107))
|
- Fixed error message for AMP + CPU incompatibility ([#6107](https://github.com/PyTorchLightning/pytorch-lightning/pull/6107))
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -564,7 +564,7 @@ class ModelCheckpoint(Callback):
|
||||||
|
|
||||||
if self.check_monitor_top_k(current):
|
if self.check_monitor_top_k(current):
|
||||||
self._update_best_and_save(current, epoch, step, trainer, pl_module, metrics)
|
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}")
|
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):
|
def _is_valid_monitor_key(self, metrics):
|
||||||
|
|
Loading…
Reference in New Issue