class CompletionCB(Callback):
def before_fit(self, pipeline): self.count = 0
def after_batch(self, pipeline): self.count += 1
def after_fit(self, pipeline): print(f'Completed {self.count} batches')
Callbacks
Base
CancelEpochException
Common base class for all non-exit exceptions.
CancelBatchException
Common base class for all non-exit exceptions.
CancelFitException
Common base class for all non-exit exceptions.
Callback
Callback ()
Initialize self. See help(type(self)) for accurate signature.
run_cbs
run_cbs (cbs, method_nm, pipeline=None)
= [CompletionCB()]
cbs 'before_fit')
run_cbs(cbs, 'after_batch')
run_cbs(cbs, 'after_fit') run_cbs(cbs,
Completed 1 batches