def test_epoch_end(self, outputs):
    avg_test_loss = torch.stack([out['test_loss'] for out in outputs]).mean()
    self.log('test/loss', avg_test_loss)
    y_true = torch.cat([out['y_true'] for out in outputs])
    y_prob = torch.cat([out['y_prob'] for out in outputs])
    self.trainer.datamodule.fill_prob('test', self.global_step, y_prob.detach().cpu().numpy())
    (scores, cm2, thresh) = utils.get_metrics_probabilistic(y_true, y_prob, criterion=None)
    logger.info(scores)
    logger.info(cm2)
    self.log_scores('test', scores)
    self.log_cm('test/cm2', cm2)
    self.log_eval_plots('test', y_true, y_prob)
    mlflow.log_artifacts(self.logger.log_dir, 'tensorboard/test')
def test_epoch_end(self, outputs):
    avg_test_loss = torch.stack([out['test_loss'] for out in outputs]).mean()
    self.log('test/loss', avg_test_loss)
    y_true = torch.cat([out['y_true'] for out in outputs])
    y_prob = torch.cat([out['y_prob'] for out in outputs])
    self.trainer.datamodule.fill_prob('test', self.global_step, y_prob.detach().cpu().numpy())
    (scores, cm2, thresh) = utils.get_metrics_probabilistic(y_true, y_prob, criterion=None)
    logger.info(scores)
    logger.info(cm2)
    self.log_scores('test', scores)
    self.log_cm('test/cm2', cm2)
    self.log_eval_plots('test', y_true, y_prob)
    mlflow.log_artifacts(self.logger.log_dir, 'tensorboard/test')