EaryStoppingCallback doesn't work

earlystop

callbacks = [EarlyStoppingCallback(learn, monitor='error_rate', min_delta=1e-5, patience=5)]
learn.fit_one_cycle(30, callbacks=callbacks, max_lr=slice(1e-5,1e-3))

As you can see, I use patience = 5 and min_delta=1e-5 and monitor=‘error_rate’

My understanding is: patience tells how many epochs it waits if improvement is less than min_delta on the monitored value, in this case it’s error_rate.

So if my understanding was correct, then it would not stop at Epoch 6.

So is this my understanding wrong or the debug in fast.ai lib ?

Could someone help, please.