def training_step(self, batch: Batch, *args, **kwargs) -> torch.Tensor:
        """Extract features from the input batch during training.

        Args:
            batch (Batch): Input batch containing video clips.
            *args: Additional positional arguments (unused).
            **kwargs: Additional keyword arguments (unused).

        Returns:
            torch.Tensor: Dummy loss tensor for compatibility.
        """
        del args, kwargs  # These variables are not used.

        # Ensure batch.image is a tensor
        if batch.image is None or not isinstance(batch.image, torch.Tensor):
            msg = "Expected batch.image to be a tensor, but got None or non-tensor type"
            raise ValueError(msg)

        embedding = self.model.get_features(batch.image)[0].squeeze()
        self.embeddings.append(embedding)

        # Return a dummy loss tensor
        return torch.tensor(0.0, requires_grad=True, device=self.device)
Extract features from the input batch during training.

        Args:
            batch (Batch): Input batch containing video clips.
            *args: Additional positional arguments (unused).
            **kwargs: Additional keyword arguments (unused).

        Returns:
            torch.Tensor: Dummy loss tensor for compatibility.
        
src/anomalib/models/video/fuvas/lightning_model.py