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 committed Apr 26, 2024
1 parent 19e0b0a commit b075682
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 b075682

Please sign in to comment.