From 3be557dc5bcc252adecafc97c0f62d3316503ae4 Mon Sep 17 00:00:00 2001 From: Pattarawat Chormai Date: Tue, 9 Jun 2020 13:10:44 +0200 Subject: [PATCH] document: fix callback signature (#2113) --- pytorch_lightning/trainer/__init__.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pytorch_lightning/trainer/__init__.py b/pytorch_lightning/trainer/__init__.py index 3a2881fe75..3c37671982 100644 --- a/pytorch_lightning/trainer/__init__.py +++ b/pytorch_lightning/trainer/__init__.py @@ -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 ^^^^^^^^^^^^^^^^^^^^^^^