Skip to content

Commit ea88661

Browse files
committed
stupid formatting
1 parent 3a44c73 commit ea88661

File tree

2 files changed

+6
-12
lines changed

2 files changed

+6
-12
lines changed

pytorch_lightning/accelerators/accelerator_connector.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ def __init__(
9090
self.replace_sampler_ddp = replace_sampler_ddp
9191
self.deterministic = deterministic
9292
self.precision = precision
93-
self.amp_type = amp_type.lower() if isinstance(amp_type, str) else None
93+
self.amp_type = amp_type.lower() if isinstance(amp_type, str) else None
9494
self.amp_level = amp_level
9595
self.cluster_environment = cluster_environment
9696
self.is_slurm_managing_tasks = False

pytorch_lightning/plugins/training_type/tpu_spawn.py

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -182,18 +182,12 @@ def __load_weights_on_main_process(self) -> None:
182182
def xmp_spawn_kwargs(self):
183183
return {
184184
"args": (self.lightning_module, trainer, self.mp_queue),
185-
"nproc": len(self.parallel_devices),
186-
"start_method": self.start_method
187-
}
185+
"nproc": len(self.parallel_devices),
186+
"start_method": self.start_method
187+
}
188188

189189
def start_training(self, trainer) -> None:
190-
xmp.spawn(
191-
self.new_process,
192-
**self.xmp_spawn_kwargs
193-
)
190+
xmp.spawn(self.new_process, **self.xmp_spawn_kwargs)
194191

195192
def start_testing(self, trainer) -> None:
196-
xmp.spawn(
197-
self.new_process,
198-
**self.xmp_spawn_kwargs
199-
)
193+
xmp.spawn(self.new_process, **self.xmp_spawn_kwargs)

0 commit comments

Comments
 (0)