File tree 1 file changed +4
-5
lines changed
pytorch_lightning/trainer/connectors
1 file changed +4
-5
lines changed Original file line number Diff line number Diff line change @@ -410,7 +410,8 @@ def final_training_type_plugin(self) -> TrainingTypePlugin:
410
410
if (
411
411
# handle custom strategy with custom precision
412
412
(
413
- isinstance (self .strategy , TrainingTypePlugin ) and (
413
+ isinstance (self .strategy , TrainingTypePlugin )
414
+ and (
414
415
self .strategy .precision_plugin is None
415
416
or not isinstance (self .strategy .precision_plugin , PrecisionPlugin )
416
417
)
@@ -424,10 +425,8 @@ def final_training_type_plugin(self) -> TrainingTypePlugin:
424
425
if (
425
426
# handle custom strategy with custom accelerator
426
427
(
427
- isinstance (self .strategy , TrainingTypePlugin ) and (
428
- self .strategy .accelerator is None
429
- or not isinstance (self .strategy .accelerator , Accelerator )
430
- )
428
+ isinstance (self .strategy , TrainingTypePlugin )
429
+ and (self .strategy .accelerator is None or not isinstance (self .strategy .accelerator , Accelerator ))
431
430
)
432
431
or not isinstance (self .strategy , TrainingTypePlugin )
433
432
):
You can’t perform that action at this time.
0 commit comments