Skip to content

Commit

Permalink
indentation
Browse files Browse the repository at this point in the history
  • Loading branch information
awaelchli committed Feb 1, 2021
1 parent 53338f8 commit 3a44c73
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions pytorch_lightning/plugins/training_type/tpu_spawn.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@
class TPUSpawnPlugin(DDPSpawnPlugin):

def __init__(self, parallel_devices: Sequence[int], num_nodes: int = 1, **kwargs: Dict[str, Any]) -> None:

super().__init__(
parallel_devices, num_nodes=num_nodes, cluster_environment=None, sync_batchnorm=False, **kwargs
)
Expand Down Expand Up @@ -179,15 +178,13 @@ def __load_weights_on_main_process(self) -> None:

self.lightning_module = model

@property
def xmp_spawn_kwargs(self):
@property
def xmp_spawn_kwargs(self):
return {
"args": (self.lightning_module, trainer, self.mp_queue),
"nproc": len(self.parallel_devices),
"start_method": self.start_method
}



def start_training(self, trainer) -> None:
xmp.spawn(
Expand Down

0 comments on commit 3a44c73

Please sign in to comment.