def validation_step(self, batch: Batch, *args, **kwargs) -> Batch:
        """Update min and max scores from the current step.

        Args:
            batch (Batch): Predicted difference between z and z_hat.
            args: Additional arguments.
            kwargs: Additional keyword arguments.

        Returns:
            (STEP_OUTPUT): Output predictions.
        """
        del args, kwargs  # Unused arguments.

        predictions = self.model(batch.image)
        self.max_scores = max(self.max_scores, torch.max(predictions.pred_score))
        self.min_scores = min(self.min_scores, torch.min(predictions.pred_score))
        return batch.update(**predictions._asdict())
Update min and max scores from the current step.

        Args:
            batch (Batch): Predicted difference between z and z_hat.
            args: Additional arguments.
            kwargs: Additional keyword arguments.

        Returns:
            (STEP_OUTPUT): Output predictions.
        
src/anomalib/models/image/ganomaly/lightning_model.py