def _default_compare_fn(best_eval_result, current_eval_result):
      """Returns True if the current metric is better than the best metric."""
      if higher_is_better:
        return current_eval_result[metric_name] > best_eval_result[metric_name]
      else:
        return current_eval_result[metric_name] < best_eval_result[metric_name]
Returns True if the current metric is better than the best metric.
language/common/utils/exporters.py