def METHOD_NAME(self):
    trainer = ContrastiveTrainer(
        encoder=self.build_encoder(),
        augmenter=self.build_augmenter(),
        projector=self.build_projector(),
        probe=self.build_probe(),
    )
    with self.assertRaises(ValueError):
        trainer.compile(
            encoder_optimizer=optimizers.Adam(),
            encoder_loss=SimCLRLoss(temperature=0.5),
        )