@@ -392,11 +392,12 @@ def on_before_accelerator_backend_setup(self, trainer, pl_module) -> None:
392
392
393
393
model = BoringModel ()
394
394
trainer = Trainer (
395
+ default_root_dir = tmpdir ,
396
+ progress_bar_refresh_rate = 0 ,
395
397
max_epochs = 1 ,
396
398
plugins = [DeepSpeedPlugin (config = deepspeed_zero_config )],
397
399
precision = 16 ,
398
400
gpus = 1 ,
399
- default_root_dir = tmpdir ,
400
401
callbacks = [TestCallback ()]
401
402
)
402
403
with pytest .raises (SystemExit ):
@@ -410,8 +411,8 @@ def test_deepspeed_multigpu(tmpdir, deepspeed_config):
410
411
"""
411
412
model = BoringModel ()
412
413
trainer = Trainer (
413
- plugins = [DeepSpeedPlugin (zero_optimization = False , stage = 2 )],
414
414
default_root_dir = tmpdir ,
415
+ plugins = [DeepSpeedPlugin (zero_optimization = False , stage = 2 )],
415
416
gpus = 2 ,
416
417
fast_dev_run = True ,
417
418
precision = 16 ,
@@ -489,8 +490,8 @@ def test_deepspeed_multigpu_stage_3(tmpdir, deepspeed_config):
489
490
"""
490
491
model = ModelParallelBoringModel ()
491
492
trainer = Trainer (
492
- plugins = [DeepSpeedPlugin (stage = 3 )],
493
493
default_root_dir = tmpdir ,
494
+ plugins = [DeepSpeedPlugin (stage = 3 )],
494
495
gpus = 2 ,
495
496
fast_dev_run = True ,
496
497
precision = 16 ,
@@ -507,9 +508,10 @@ def run_checkpoint_test(tmpdir, save_full_weights):
507
508
dm = ClassifDataModule ()
508
509
ck = ModelCheckpoint (monitor = "val_acc" , mode = "max" , save_last = True , save_top_k = - 1 )
509
510
trainer = Trainer (
511
+ default_root_dir = tmpdir ,
512
+ progress_bar_refresh_rate = 0 ,
510
513
max_epochs = 10 ,
511
514
plugins = [DeepSpeedPlugin (stage = 3 , save_full_weights = save_full_weights )],
512
- default_root_dir = tmpdir ,
513
515
gpus = 2 ,
514
516
precision = 16 ,
515
517
accumulate_grad_batches = 2 ,
@@ -525,9 +527,9 @@ def run_checkpoint_test(tmpdir, save_full_weights):
525
527
assert saved_results == results
526
528
527
529
trainer = Trainer (
530
+ default_root_dir = tmpdir ,
528
531
max_epochs = 10 ,
529
532
plugins = [DeepSpeedPlugin (stage = 3 , save_full_weights = save_full_weights )],
530
- default_root_dir = tmpdir ,
531
533
gpus = 2 ,
532
534
precision = 16 ,
533
535
accumulate_grad_batches = 2 ,
@@ -579,6 +581,8 @@ def on_train_batch_start(
579
581
model = ModelParallelClassificationModel ()
580
582
dm = ClassifDataModule ()
581
583
trainer = Trainer (
584
+ default_root_dir = tmpdir ,
585
+ progress_bar_refresh_rate = 0 ,
582
586
max_epochs = 5 ,
583
587
plugins = [DeepSpeedPlugin (stage = 2 , cpu_offload = cpu_offload )],
584
588
gpus = 2 ,
@@ -597,8 +601,8 @@ def test_deepspeed_multigpu_test(tmpdir, deepspeed_config):
597
601
"""
598
602
model = ModelParallelBoringModel ()
599
603
trainer = Trainer (
600
- plugins = [DeepSpeedPlugin (stage = 3 )],
601
604
default_root_dir = tmpdir ,
605
+ plugins = [DeepSpeedPlugin (stage = 3 )],
602
606
gpus = 2 ,
603
607
fast_dev_run = True ,
604
608
precision = 16 ,
0 commit comments