Skip to content

Commit

Permalink
Add back comment
Browse files Browse the repository at this point in the history
  • Loading branch information
carmocca committed Oct 15, 2021
1 parent 14e61d8 commit 1a7773e
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions pytorch_lightning/trainer/trainer.py
Original file line number Diff line number Diff line change
Expand Up @@ -1412,6 +1412,7 @@ def call_hook(
if hook_name in ("on_train_start",) and hasattr(self.accelerator, hook_name):
accelerator_hook = getattr(self.accelerator, hook_name)
accelerator_output = accelerator_hook(*args, **kwargs)
# Rely on the accelerator output if lightningModule hook returns nothing
# Required for cases such as DataParallel where we reduce the output for the user
# todo: move this data parallel logic into the data parallel plugin
output = accelerator_output if output is None else output
Expand Down

0 comments on commit 1a7773e

Please sign in to comment.