diff --git a/pytorch_lightning/plugins/training_type/tpu_spawn.py b/pytorch_lightning/plugins/training_type/tpu_spawn.py index 98d164c0b8b4e..9639a17e637bb 100644 --- a/pytorch_lightning/plugins/training_type/tpu_spawn.py +++ b/pytorch_lightning/plugins/training_type/tpu_spawn.py @@ -158,9 +158,7 @@ def save(self, state_dict: Dict, path: str) -> None: try: xm.save(state_dict, path) except RuntimeError as e: - if "Failed to meet rendezvous" in str(e): - pass - else: + if "Failed to meet rendezvous" not in str(e): raise e def broadcast(self, obj: object, src: int = 0) -> object: