def METHOD_NAME(self, outputs, inputs):
    """
    Based on outputs calculate the metrics
    """
    loss, logits = outputs[:2]
    preds = logits.detach().cpu().numpy()
    out_labels_ids = inputs["labels"].detach().cpu().numpy()
    if self.context.get_data_config()["output_mode"] == "classification":
        preds = np.argmax(preds, axis=1)
    elif self.context.get_data_config()["output_mode"] == "regression":
        preds = np.squeeze(preds)
    results = compute_metrics(
        self.context.get_data_config().get("task").lower(), preds, out_labels_ids
    )
    results["loss"] = loss
    return results