Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion tests/plugins/test_deepspeed_plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -568,7 +568,6 @@ def test_deepspeed_multigpu_stage_2_accumulated_grad_batches(tmpdir, cpu_offload
"""
Test to ensure with Stage 2 and multiple GPUs, accumulated grad batches works.
"""
os.environ['MASTER_PORT'] = "29500"
seed_everything(42)

class VerificationCallback(Callback):
Expand Down
18 changes: 15 additions & 3 deletions tests/plugins/test_sharded_plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -297,12 +297,24 @@ def training_step(self, batch, batch_idx):


@RunIf(skip_windows=True, special=True, fairscale=True, min_gpus=2)
@pytest.mark.parametrize("accelerator", ["ddp_sharded", "ddp_sharded_spawn"])
def test_ddp_sharded_plugin_manual_optimization(tmpdir, accelerator):
def test_ddp_sharded_plugin_manual_optimization_spawn(tmpdir):
# todo (sean): this test has been split out as running both tests using parametrize causes "Address in use"
model = ManualBoringModel()
trainer = Trainer(
default_root_dir=tmpdir,
accelerator=accelerator,
accelerator='ddp_sharded_spawn',
fast_dev_run=2,
gpus=2,
)
trainer.fit(model)


@RunIf(skip_windows=True, special=True, fairscale=True, min_gpus=2)
def test_ddp_sharded_plugin_manual_optimization(tmpdir):
model = ManualBoringModel()
trainer = Trainer(
default_root_dir=tmpdir,
accelerator='ddp_sharded',
fast_dev_run=2,
gpus=2,
)
Expand Down