(best_eval_result,
                   current_eval_result,
                   default_key=metric_keys.MetricKeys.AUC)
return best_eval_result[default_key] > current_eval_result[default_key]
Compares two evaluation results and returns true if the 2nd one is smaller.
              Both evaluation results should have the values for MetricKeys.LOSS, which are
              used for comparison.
              Args:
                best_eval_result: best eval metrics.
                current_eval_result: current eval metrics.
                default_key: metric_keys.MericKeys
              Returns:
                True if the loss of current_eval_result is smaller; otherwise, False.
              Raises:
               ValueError: If input eval result is None or no loss is available.
Compares two evaluation results and returns true if the 2nd one is smaller.
              Both evaluation results should have the values for MetricKeys.LOSS, which are
              used for comparison.
              Args:
                best_eval_result: best eval metrics.
                current_eval_result: current eval metrics.
                default_key: metric_keys.MericKeys
              Returns:
                True if the loss of current_eval_result is smaller; otherwise, False.
              Raises:
               ValueError: If input eval result is None or no loss is available.
Compares two evaluation results and returns true if the 2nd one is smaller . Both evaluation results should have the values for MetricKeys . LOSS which are used for comparison . Args : best_eval_result : best eval metrics . current_eval_result : current eval metrics . default_key : metric_keys . MericKeys Returns : True if the loss of current_eval_result is smaller ; otherwise False . Raises : ValueError : If input eval result is None or no loss is available .
def metric_smaller(best_eval_result,
                   current_eval_result,
                   default_key=metric_keys.MetricKeys.AUC):
  """Compares two evaluation results and returns true if the 2nd one is smaller.
              Both evaluation results should have the values for MetricKeys.LOSS, which are
              used for comparison.
              Args:
                best_eval_result: best eval metrics.
                current_eval_result: current eval metrics.
                default_key: metric_keys.MericKeys
              Returns:
                True if the loss of current_eval_result is smaller; otherwise, False.
              Raises:
               ValueError: If input eval result is None or no loss is available.
        """
  if not best_eval_result or default_key not in best_eval_result:
    raise ValueError(
        'best_eval_result cannot be empty or no loss is found in it.')

  if not current_eval_result or default_key not in current_eval_result:
    raise ValueError(
        'current_eval_result cannot be empty or no loss is found in it.')
  return best_eval_result[default_key] > current_eval_result[default_key]
def metric_smaller ( best_eval_result , current_eval_result , default_key = metric_keys . MetricKeys . AUC ) : if not best_eval_result or default_key not in best_eval_result : raise ValueError ( 'best_eval_result cannot be empty or no loss is found in it.' ) if not current_eval_result or default_key not in current_eval_result : raise ValueError ( 'current_eval_result cannot be empty or no loss is found in it.' ) return best_eval_result [ default_key ] > current_eval_result [ default_key ]