def _on_train_epoch_end_hook(self, processed_epoch_output) -> None:
    hook_name = 'on_train_epoch_end'
    skip = self.trainer._reset_result_and_set_hook_fx_name(hook_name)
    with self.trainer.profiler.profile(hook_name):
        if hasattr(self.trainer, hook_name):
            trainer_hook = getattr(self.trainer, hook_name)
            trainer_hook(processed_epoch_output)
        model_ref = self.trainer.lightning_module
        if is_overridden(hook_name, model_ref):
            hook_fx = getattr(model_ref, hook_name)
            if is_param_in_hook_signature(hook_fx, 'outputs'):
                self.warning_cache.warn('The signature of `ModelHooks.on_train_epoch_end` has changed in v1.3. `outputs` parameter has been deprecated. Support for the old signature will be removed in v1.5', DeprecationWarning)
                model_ref.on_train_epoch_end(processed_epoch_output)
            else:
                model_ref.on_train_epoch_end()
        elif hasattr(self.trainer.accelerator, hook_name):
            accelerator_hook = getattr(self.trainer.accelerator, hook_name)
            accelerator_hook()
    if (not skip):
        self.trainer._cache_logged_metrics()
def _on_train_epoch_end_hook(self, processed_epoch_output) -> None:
    hook_name = 'on_train_epoch_end'
    skip = self.trainer._reset_result_and_set_hook_fx_name(hook_name)
    with self.trainer.profiler.profile(hook_name):
        if hasattr(self.trainer, hook_name):
            trainer_hook = getattr(self.trainer, hook_name)
            trainer_hook(processed_epoch_output)
        model_ref = self.trainer.lightning_module
        if is_overridden(hook_name, model_ref):
            hook_fx = getattr(model_ref, hook_name)
            if is_param_in_hook_signature(hook_fx, 'outputs'):
                self.warning_cache.warn('The signature of `ModelHooks.on_train_epoch_end` has changed in v1.3. `outputs` parameter has been deprecated. Support for the old signature will be removed in v1.5', DeprecationWarning)
                model_ref.on_train_epoch_end(processed_epoch_output)
            else:
                model_ref.on_train_epoch_end()
        elif hasattr(self.trainer.accelerator, hook_name):
            accelerator_hook = getattr(self.trainer.accelerator, hook_name)
            accelerator_hook()
    if (not skip):
        self.trainer._cache_logged_metrics()