Seen on code inspection, I haven’t encountered any issues with it:
def on_batch_begin(self, xb:Tensor, yb:Tensor, train:bool=True)->None:
"Handle new batch `xb`,`yb` in `train` or validation."
self.state_dict.update(dict(last_input=xb, last_target=yb, train=train,
stop_epoch=False, skip_step=False, skip_zero=False, skip_bwd=False))
self('batch_begin', mets = not self.state_dict['train'])
return self.state_dict['last_input'], self.state_dict['last_target']
By comparison with other on_event
handlers, I think mets= is maybe meant to be call_mets=