def METHOD_NAME(self):
    reduce_lr = callbacks.ReduceLROnPlateau(
        patience=1, factor=0.1, monitor="val_loss", min_delta=100
    )
    self.model.compile(
        loss="mse",
        optimizer=optimizers.Adam(
            optimizers.schedules.PolynomialDecay(
                initial_learning_rate=0.1, decay_steps=10
            )
        ),
    )
    with self.assertRaisesRegex(
        TypeError,
        "This optimizer was created with a `LearningRateSchedule`",
    ):
        self.model.fit(
            self.x_train,
            self.y_train,
            validation_data=(self.x_test, self.y_test),
            callbacks=[reduce_lr],
            epochs=2,
        )