diff options
author | Mark Daoust <markdaoust@google.com> | 2018-06-05 09:18:14 -0700 |
---|---|---|
committer | TensorFlower Gardener <gardener@tensorflow.org> | 2018-06-05 09:22:17 -0700 |
commit | 72f6b4d93059086c453d344103c3bfe308a4e90d (patch) | |
tree | a98c0fc0c3b0e5703ad34e6d8a91310a41d2d5de /tensorflow/python/keras/callbacks.py | |
parent | 51445a754dd3d6f3a7b2e89b8d02d0f467c36b63 (diff) |
Delete "RuntimeWarning" it is not having the intended effect.
These `RuntimeWarning` are being interpreted as arguments to the string formatting, raising "TypeError: not all arguments converted during string formatting" errors.
PiperOrigin-RevId: 199307228
Diffstat (limited to 'tensorflow/python/keras/callbacks.py')
-rw-r--r-- | tensorflow/python/keras/callbacks.py | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/tensorflow/python/keras/callbacks.py b/tensorflow/python/keras/callbacks.py index 36782728e8..8061d47295 100644 --- a/tensorflow/python/keras/callbacks.py +++ b/tensorflow/python/keras/callbacks.py @@ -424,7 +424,7 @@ class ModelCheckpoint(Callback): if mode not in ['auto', 'min', 'max']: logging.warning('ModelCheckpoint mode %s is unknown, ' - 'fallback to auto mode.', (mode), RuntimeWarning) + 'fallback to auto mode.', mode) mode = 'auto' if mode == 'min': @@ -451,7 +451,7 @@ class ModelCheckpoint(Callback): current = logs.get(self.monitor) if current is None: logging.warning('Can save best model only with %s available, ' - 'skipping.', self.monitor, RuntimeWarning) + 'skipping.', self.monitor) else: if self.monitor_op(current, self.best): if self.verbose > 0: @@ -515,7 +515,7 @@ class EarlyStopping(Callback): if mode not in ['auto', 'min', 'max']: logging.warning('EarlyStopping mode %s is unknown, ' - 'fallback to auto mode.', mode, RuntimeWarning) + 'fallback to auto mode.', mode) mode = 'auto' if mode == 'min': @@ -544,7 +544,7 @@ class EarlyStopping(Callback): if current is None: logging.warning('Early stopping conditioned on metric `%s` ' 'which is not available. Available metrics are: %s', - self.monitor, ','.join(list(logs.keys())), RuntimeWarning) + self.monitor, ','.join(list(logs.keys()))) return if self.monitor_op(current - self.min_delta, self.best): self.best = current @@ -898,7 +898,7 @@ class ReduceLROnPlateau(Callback): """ if self.mode not in ['auto', 'min', 'max']: logging.warning('Learning Rate Plateau Reducing mode %s is unknown, ' - 'fallback to auto mode.', self.mode, RuntimeWarning) + 'fallback to auto mode.', self.mode) self.mode = 'auto' if (self.mode == 'min' or (self.mode == 'auto' and 'acc' not in self.monitor)): @@ -920,7 +920,7 @@ class ReduceLROnPlateau(Callback): if current is None: logging.warning('Reduce LR on plateau conditioned on metric `%s` ' 'which is not available. Available metrics are: %s', - self.monitor, ','.join(list(logs.keys())), RuntimeWarning) + self.monitor, ','.join(list(logs.keys()))) else: if self.in_cooldown(): |