@@ -429,29 +429,20 @@ def _predict_batch(trainer, model, batches):
429
429
return out
430
430
431
431
432
- @RunIf (deepspeed = True , min_gpus = 1 , standalone = True )
433
- @pytest .mark .parametrize ("automatic_optimization" , (True , False ))
434
- def test_trainer_model_hook_system_fit_deepspeed (tmpdir , automatic_optimization ):
435
- _run_trainer_model_hook_system_fit (
436
- dict (gpus = 1 , precision = 16 , strategy = "deepspeed" ), tmpdir , automatic_optimization = automatic_optimization
437
- )
438
-
439
-
440
432
@pytest .mark .parametrize (
441
433
"kwargs" ,
442
434
[
443
435
{},
444
436
# these precision plugins modify the optimization flow, so testing them explicitly
445
437
pytest .param (dict (gpus = 1 , precision = 16 , amp_backend = "native" ), marks = RunIf (min_gpus = 1 )),
446
438
pytest .param (dict (gpus = 1 , precision = 16 , amp_backend = "apex" ), marks = RunIf (amp_apex = True , min_gpus = 1 )),
439
+ pytest .param (
440
+ dict (gpus = 1 , precision = 16 , strategy = "deepspeed" ), marks = RunIf (deepspeed = True , min_gpus = 1 , standalone = True )
441
+ ),
447
442
],
448
443
)
449
444
@pytest .mark .parametrize ("automatic_optimization" , (True , False ))
450
445
def test_trainer_model_hook_system_fit (tmpdir , kwargs , automatic_optimization ):
451
- _run_trainer_model_hook_system_fit (kwargs , tmpdir , automatic_optimization )
452
-
453
-
454
- def _run_trainer_model_hook_system_fit (kwargs , tmpdir , automatic_optimization ):
455
446
called = []
456
447
457
448
class TestModel (HookedModel ):
0 commit comments