def format_metrics(metrics, split):
  """Formats metrics for logging.

  Args:
    metrics: Dictionary with metrics.
    split: String indicating the KG dataset split.

  Returns:
    String with formatted metrics.
  """
  result = '\t {} MR: {:.2f} | '.format(split, metrics['MR'])
  result += 'MRR: {:.3f} | '.format(metrics['MRR'])
  result += 'H@1: {:.3f} | '.format(metrics['hits@[1,3,10]'][0])
  result += 'H@3: {:.3f} | '.format(metrics['hits@[1,3,10]'][1])
  result += 'H@10: {:.3f}'.format(metrics['hits@[1,3,10]'][2])
  return result