From b73c9f1236f405268a7406416ed1672db68c3d2e Mon Sep 17 00:00:00 2001 From: Francois Chollet Date: Fri, 28 Aug 2020 10:59:28 -0700 Subject: [PATCH] Clean up callback warnings PiperOrigin-RevId: 328969711 Change-Id: I28109e56f38138fe75b7f0cc257b1fddc579b051 --- tensorflow/python/keras/callbacks.py | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) diff --git a/tensorflow/python/keras/callbacks.py b/tensorflow/python/keras/callbacks.py index a78dfa78cee..c01ab3361b4 100644 --- a/tensorflow/python/keras/callbacks.py +++ b/tensorflow/python/keras/callbacks.py @@ -1264,16 +1264,6 @@ class ModelCheckpoint(Callback): self.save_weights_only = True def on_train_begin(self, logs=None): - # pylint: disable=protected-access - if self.model._in_multi_worker_mode: - logging.warning( - 'Automatic model reloading for interrupted job was removed from ' - 'the `ModelCheckpoint` callback in multi-worker mode, please use the ' - '`keras.callbacks.experimental.BackupAndRestore` callback instead. ' - 'See this tutorial for details: ' - 'https://www.tensorflow.org/tutorials/distribute/' - 'multi_worker_with_keras#backupandrestore_callback.' - ) if self.load_weights_on_restart: filepath_to_load = ( self._get_most_recently_modified_file_matching_pattern(self.filepath)) @@ -2422,7 +2412,7 @@ class ReduceLROnPlateau(Callback): """Resets wait counter and cooldown counter. """ if self.mode not in ['auto', 'min', 'max']: - logging.warning('Learning Rate Plateau Reducing mode %s is unknown, ' + logging.warning('Learning rate reduction mode %s is unknown, ' 'fallback to auto mode.', self.mode) self.mode = 'auto' if (self.mode == 'min' or @@ -2443,7 +2433,7 @@ class ReduceLROnPlateau(Callback): logs['lr'] = K.get_value(self.model.optimizer.lr) current = logs.get(self.monitor) if current is None: - logging.warning('Reduce LR on plateau conditioned on metric `%s` ' + logging.warning('Learning rate reduction is conditioned on metric `%s` ' 'which is not available. Available metrics are: %s', self.monitor, ','.join(list(logs.keys())))