From dd306904bd36e1d591031e3b3cfba05c51a7ee8f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adrian=20W=C3=A4lchli?= Date: Mon, 6 Dec 2021 17:54:04 +0100 Subject: [PATCH] call hook on ttp instead of acc --- pytorch_lightning/trainer/trainer.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pytorch_lightning/trainer/trainer.py b/pytorch_lightning/trainer/trainer.py index 274a19333f51a..5624d376bf816 100644 --- a/pytorch_lightning/trainer/trainer.py +++ b/pytorch_lightning/trainer/trainer.py @@ -1538,7 +1538,7 @@ def _call_accelerator_hook( **kwargs: Any, ) -> Optional[Any]: self.lightning_module._current_fx_name = hook_name - fn = getattr(self.accelerator, hook_name) + fn = getattr(self.training_type_plugin, hook_name) if not callable(fn): return None