How to override fit_one_cycle method?

I want to override the fit_one_cycle method of the Learner class. When I go through the code in fastai/, I don’t find that method. I see that fit_one_cycle is implemented in fastai/, but I don’t understand how it is linked to the Learner class when I create a Learner object, because it is not defined within the class itself. Thanks in advance.

What would you like to do instead of fit_one_cycle? Is it .fit you are looking for?

fit_one_cycle is defined in and the function is assigned to the Learn class on line 67.

1 Like