Skip to content

Commit

Permalink
[test] Fixes EarlyStopping flaky test (#2926)
Browse files Browse the repository at this point in the history
  • Loading branch information
frankfliu authored Jan 9, 2024
1 parent d58b755 commit 1cbddbf
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ public void testEarlyStoppingStopsOnEpoch1AsMaxDurationIs1ms() throws Exception
// epoch
EasyTrain.fit(trainer, 10, trainMnistDataset, testMnistDataset);
} catch (EarlyStoppingListener.EarlyStoppedException e) {
Assert.assertTrue(e.getMessage().contains("ms elapsed >= 1 maxMillis"));
Assert.assertTrue(e.getMessage().contains("ms elapsed >="));
Assert.assertTrue(e.getStopEpoch() < 10); // Stop epoch is before 10
}

Expand Down

0 comments on commit 1cbddbf

Please sign in to comment.