Skip to content

Commit

Permalink
Fix flakiness of ReduceLROnPlateau tests (keras-team#135)
Browse files Browse the repository at this point in the history
  • Loading branch information
ianstenbit authored May 10, 2023
1 parent 6be0e2a commit eb09131
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions keras_core/callbacks/reduce_lr_on_plateau_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ def setUp(self):

def test_reduces_lr_with_model_fit(self):
reduce_lr = callbacks.ReduceLROnPlateau(
patience=1, factor=0.1, monitor="val_loss", min_delta=10
patience=1, factor=0.1, monitor="val_loss", min_delta=100
)

self.model.fit(
Expand All @@ -49,7 +49,7 @@ def test_reduces_lr_with_model_fit(self):

def test_throws_when_optimizer_has_schedule(self):
reduce_lr = callbacks.ReduceLROnPlateau(
patience=1, factor=0.1, monitor="val_loss", min_delta=10
patience=1, factor=0.1, monitor="val_loss", min_delta=100
)

self.model.compile(
Expand All @@ -75,7 +75,7 @@ def test_throws_when_optimizer_has_schedule(self):

def test_verbose_logging(self):
reduce_lr = callbacks.ReduceLROnPlateau(
patience=1, factor=0.1, monitor="val_loss", min_delta=10, verbose=1
patience=1, factor=0.1, monitor="val_loss", min_delta=100, verbose=1
)
io_utils.disable_interactive_logging()

Expand Down Expand Up @@ -111,7 +111,11 @@ def test_honors_min_lr(self):

def test_cooldown(self):
reduce_lr = callbacks.ReduceLROnPlateau(
patience=1, factor=0.1, monitor="val_loss", min_delta=10, cooldown=2
patience=1,
factor=0.1,
monitor="val_loss",
min_delta=100,
cooldown=2,
)

self.model.fit(
Expand Down

0 comments on commit eb09131

Please sign in to comment.