def METHOD_NAME(self, trainer, pl_module):
    """Compute metrics at the end of validation.
    Sets the model to trained mode before computing metrics and restores training
    mode thereafter. Metrics are not logged with a `"validation"` prefix as the
    metrics are only computed on the validation set.
    """
    model = trainer._model  # TODO: Remove with a better way to access model
    model.is_trained = True
    metrics = {}
    for metric_name, metric_fn in self.metric_fns.items():
        metric_value = metric_fn(model)
        metrics[metric_name] = metric_value
    metrics["epoch"] = trainer.current_epoch
    pl_module.logger.log_metrics(metrics, trainer.global_step)
    model.is_trained = False