Multiple calback ranges for earlystopping: How to call the epoch index?

Hi,
I am trying to apply two diffirent early stoppings at different epoch ranges. The patience should be very low as the epoch index increases. I created a function to do that, but I can not call the epoch index while the learn.fit_one_cycle iterates.

I need to know how to call the index number of the current epoch to feed it in the function below

Thank’s

I am using fastai v-2.0.16

callbacks1 = [
EarlyStoppingCallback(monitor=‘valid_loss’, min_delta=1e-5, patience=10),
]

callbacks2 = [
EarlyStoppingCallback(monitor=‘valid_loss’, min_delta=1e-5, patience=2),
]

def callbcks():

if epoch < 35:
    cbk = callbacks1
else: 
    cbk = callbacks2
return cbk

def training(fold):

learn.fit_one_cycle(50, 5e-02, wd=0.4, **cbs=callbcks(epoch)**)