I’m testing out callbacks in v2, but I noticed that nothing is happening when using before_train or before_validate. When calling learn.fit
the below code doesn’t print anything at all, and it keeps training. What am I doing wrong here?
learn = Learner(dls, model, loss_func=mse, cbs=[OnlineEvalCallback])
class OnlineEvalCallback(Callback):
def before_train(self):
print("before_train")
def before_validate(self):
print('before_validate')
raise CancelFitException