diff --git a/docs/LightningModule/RequiredTrainerInterface.md b/docs/LightningModule/RequiredTrainerInterface.md index 6070185a..9cecf8a0 100644 --- a/docs/LightningModule/RequiredTrainerInterface.md +++ b/docs/LightningModule/RequiredTrainerInterface.md @@ -318,12 +318,10 @@ The ```dataset_idx``` corresponds to the order of datasets returned in ```val_da ``` {.python} def validation_end(self, outputs) ``` -If you didn't define a validation_step, this won't be called. - -Called at the end of the validation loop with the outputs of validation_step. +If you didn't define a validation_step, this won't be called. Called at the end of the validation loop with the outputs of validation_step. The outputs here are strictly for the progress bar. If you don't need to display anything, don't return anything. - +Any keys present in 'log', 'progress_bar' or the rest of the dictionary are available for callbacks to access. **Params** | Param | description | diff --git a/pytorch_lightning/trainer/trainer.py b/pytorch_lightning/trainer/trainer.py index d7a3ca01..3b4fe2c5 100644 --- a/pytorch_lightning/trainer/trainer.py +++ b/pytorch_lightning/trainer/trainer.py @@ -1364,6 +1364,10 @@ class Trainer(TrainerIOMixin): if self.use_dp or self.use_ddp2: loss = reduce_distributed_output(loss, self.num_gpus) + # use every metric passed in as a candidate for callback + callback_metrics.update(progress_bar_metrics) + callback_metrics.update(log_metrics) + return loss, progress_bar_metrics, log_metrics, callback_metrics def __clip_gradients(self):