How to reset my early stop patience counter when scheduler step() changed the learning rate?

I implemented early stop as a separated class but now i want to reset patience counter when the scheduler changes the learning rate. Is there a way to detect the scheduler step change?

The number of “bad epochs” will already be reset as seen here so if you haven’t changed the cooldown the scheduler should again apply its patience schedule.

Sorry, i was not clear enough. I need to reset the patience counter of my early stop object, but for that, i need to detect the “reset” of the scheduler patience.