Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix AttributeError: 'NoneType' object has no attribute 'finalize' on TPU #6221

Merged
merged 10 commits into from
Mar 8, 2021
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,8 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/).

- Fixed multiple early stopping callbacks ([#6197](https://github.com/PyTorchLightning/pytorch-lightning/pull/6197))

- Fixed `AttributeError` when `logger=None` on TPU ([#6221](https://github.com/PyTorchLightning/pytorch-lightning/pull/6221))
carmocca marked this conversation as resolved.
Show resolved Hide resolved


## [1.2.1] - 2021-02-23

Expand Down
2 changes: 1 addition & 1 deletion pytorch_lightning/plugins/training_type/tpu_spawn.py
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,7 @@ def __load_weights_on_main_process(self) -> None:
self._model = model

def _close_logger(self, trainer) -> None:
if hasattr(trainer, "logger"):
if hasattr(trainer, "logger.finalize"):
chizuchizu marked this conversation as resolved.
Show resolved Hide resolved
trainer.logger.finalize("success")

@property
Expand Down