Early_stopping_patience param in EarlyStoppingCallback

Hi there,
I am quite confused about the early_stopping_patience in EarlyStoppingCallback.
Is it related to the evaluation_strategy in TrainingArgs?
For example, when the evaluation_strategy=‘epoch’ and early_stopping_patience=8 in TrainingArgs, the training will stop if the metrics/ loss does not improve/reduce after 8 epochs? And works the same when evaluation_strategy=‘steps’.

EarlyStoppingCallback is related with evaluation_strategy and metric_for_best_model.

  • early_stopping_patience ( int ) — Use with metric_for_best_model to stop training when the specified metric worsens for early_stopping_patience evaluation calls.

I was confused too whether to use it with evaluation_strategy=steps or epochs, but after some trials, I realized that it better to use it with epochs to grantee that model is trained on the whole dataset