def compute_scores(ground_truth_file, predicted_answers_file):
  """Read predictions and ground truth and return P, R, F."""
  telemetry, incorrect = read_results(ground_truth_file, predicted_answers_file)
  micro = aprf(telemetry)
  relationwise = aprf_relationwise(telemetry)
  macro = sum([val[0] for _, val in relationwise.items()])
  macro = macro / len(relationwise)
  return micro, macro, relationwise, incorrect
Read predictions and ground truth and return P, R, F.
language/labs/drkit/evaluate.py