keras/src/backend/tensorflow/trainer.py/TensorFlowTrainer/compiled_loss
class TensorFlowTrainer:    def compiled_loss(
        self, y, y_pred, sample_weight=None, regularization_losses=None
    ):
        warnings.warn(
            "`model.compiled_loss()` is deprecated. Instead, use "
            "`model.compute_loss(x, y, y_pred, sample_weight, training)`.",
        )
        return self.compute_loss(
            x=None, y=y, y_pred=y_pred, sample_weight=sample_weight
        )