def fit(self) -> None:
        """Fit the PCA transformation and Gaussian model to the embeddings.

        The method aggregates embeddings collected during training and fits
        both the PCA transformation and Gaussian model used for scoring.
        """
        logger.info("Aggregating the embedding extracted from the training set.")
        embeddings = torch.vstack(self.embeddings)

        logger.info("Fitting a PCA and a Gaussian model to dataset.")
        self.model.fit(embeddings)
Fit the PCA transformation and Gaussian model to the embeddings.

        The method aggregates embeddings collected during training and fits
        both the PCA transformation and Gaussian model used for scoring.
        
src/anomalib/models/image/dfm/lightning_model.py