def _validate_condition_metric(self, logs):
    monitor_val = logs.get(self.monitor)
    error_msg = f"Early stopping conditioned on metric `{self.monitor}` which is not available. Either add `{self.monitor}` to the return of  validation_epoch end or modify your EarlyStopping callback to use any of the following: `{'`, `'.join(list(logs.keys()))}`"
    if (monitor_val is None):
        if self.strict:
            raise RuntimeError(error_msg)
        if (self.verbose > 0):
            rank_zero_warn(error_msg, RuntimeWarning)
        return False
    return True
def _validate_condition_metric(self, logs):
    monitor_val = logs.get(self.monitor)
    error_msg = f"Early stopping conditioned on metric `{self.monitor}` which is not available. Either add `{self.monitor}` to the return of  validation_epoch end or modify your EarlyStopping callback to use any of the following: `{'`, `'.join(list(logs.keys()))}`"
    if (monitor_val is None):
        if self.strict:
            raise RuntimeError(error_msg)
        if (self.verbose > 0):
            rank_zero_warn(error_msg, RuntimeWarning)
        return False
    return True