Standard built-in tools in PyTorch (not in other GitHub repos) for early stopping

Is there any built-in tools for early stopping in newer versions of PyTorch or should I use something like GitHub - Bjarten/early-stopping-pytorch: Early stopping for PyTorch for Early Stopping? Imagine I want to set the patience to 5 (is that a good number for patience?).

Searching “early stopping” in the forum brought these results:

  1. only a question Pytorch Early stopping,
  2. kinda a self implementation Early Stopping - Loop does not 'break' training continues
  3. only a question How to apply early stopping in training code?
  4. an answer by Piotr pointing to torchsample Early Stopping in PyTorch - #2 by ptrblck

One thing I notice about torchsample package is that I should change so much of my code in order to use it. Are there less invasive methods you would suggest?