document: fix callback signature (#2113)
This commit is contained in:
parent
8d3d471f03
commit
3be557dc5b
|
@ -238,10 +238,10 @@ Example::
|
|||
from pytorch_lightning.callbacks import Callback
|
||||
|
||||
class PrintCallback(Callback):
|
||||
def on_train_start(self):
|
||||
def on_train_start(self, trainer, pl_module):
|
||||
print("Training is started!")
|
||||
def on_train_end(self):
|
||||
print(f"Training is done. The logs are: {self.trainer.logs}")
|
||||
def on_train_end(self, trainer, pl_module):
|
||||
print("Training is done.")
|
||||
|
||||
check_val_every_n_epoch
|
||||
^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
|
Loading…
Reference in New Issue