def training_step(self, batch: VideoBatch) -> None:
        """Training Step of AI-VAD.

        Extract features from the batch of clips and update the density estimators.

        Args:
            batch (VideoBatch): Batch containing video frames and metadata.
        """
        features_per_batch = self.model(batch.image)

        assert isinstance(batch.video_path, list)
        for features, video_path in zip(features_per_batch, batch.video_path, strict=True):
            self.model.density_estimator.update(features, video_path)
            self.total_detections += len(next(iter(features.values())))

        # Return a dummy loss tensor
        return torch.tensor(0.0, requires_grad=True, device=self.device)
Training Step of AI-VAD.

        Extract features from the batch of clips and update the density estimators.

        Args:
            batch (VideoBatch): Batch containing video frames and metadata.
        
src/anomalib/models/video/ai_vad/lightning_model.py