From 9020cf91b584677358225eec27f50d37f2c6ccb6 Mon Sep 17 00:00:00 2001 From: William Falcon Date: Sun, 26 Apr 2020 12:53:42 -0400 Subject: [PATCH] fixed warning --- pytorch_lightning/callbacks/early_stopping.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pytorch_lightning/callbacks/early_stopping.py b/pytorch_lightning/callbacks/early_stopping.py index 2af05211..4c30b677 100644 --- a/pytorch_lightning/callbacks/early_stopping.py +++ b/pytorch_lightning/callbacks/early_stopping.py @@ -80,8 +80,9 @@ class EarlyStopping(Callback): """ monitor_val = logs.get(self.monitor) error_msg = (f'Early stopping conditioned on metric `{self.monitor}`' - f' which is not available. Available metrics are:' - f' `{"`, `".join(list(logs.keys()))}`') + f' which is not available. Either add `{self.monitor}` to the return of ' + f' validation_epoch end or modify your EarlyStopping callback to use any of the ' + f'following: `{"`, `".join(list(logs.keys()))}`') if monitor_val is None: if self.strict: