Skip to content

Commit 1a7773e

Browse files
committed
Add back comment
1 parent 14e61d8 commit 1a7773e

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

pytorch_lightning/trainer/trainer.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1412,6 +1412,7 @@ def call_hook(
14121412
if hook_name in ("on_train_start",) and hasattr(self.accelerator, hook_name):
14131413
accelerator_hook = getattr(self.accelerator, hook_name)
14141414
accelerator_output = accelerator_hook(*args, **kwargs)
1415+
# Rely on the accelerator output if lightningModule hook returns nothing
14151416
# Required for cases such as DataParallel where we reduce the output for the user
14161417
# todo: move this data parallel logic into the data parallel plugin
14171418
output = accelerator_output if output is None else output

0 commit comments

Comments
 (0)