Skip to content

Commit b3649df

Browse files
Sean Narenlexierule
authored andcommitted
Fix Special Tests (#7841)
* Remove port setting * Drop one of the params to see what happens * Split tests into two * Try using port setting
1 parent 40439bc commit b3649df

File tree

1 file changed

+15
-3
lines changed

1 file changed

+15
-3
lines changed

tests/plugins/test_sharded_plugin.py

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -297,12 +297,24 @@ def training_step(self, batch, batch_idx):
297297

298298

299299
@RunIf(skip_windows=True, special=True, fairscale=True, min_gpus=2)
300-
@pytest.mark.parametrize("accelerator", ["ddp_sharded", "ddp_sharded_spawn"])
301-
def test_ddp_sharded_plugin_manual_optimization(tmpdir, accelerator):
300+
def test_ddp_sharded_plugin_manual_optimization_spawn(tmpdir):
301+
# todo (sean): this test has been split out as running both tests using parametrize causes "Address in use"
302302
model = ManualBoringModel()
303303
trainer = Trainer(
304304
default_root_dir=tmpdir,
305-
accelerator=accelerator,
305+
accelerator='ddp_sharded_spawn',
306+
fast_dev_run=2,
307+
gpus=2,
308+
)
309+
trainer.fit(model)
310+
311+
312+
@RunIf(skip_windows=True, special=True, fairscale=True, min_gpus=2)
313+
def test_ddp_sharded_plugin_manual_optimization(tmpdir):
314+
model = ManualBoringModel()
315+
trainer = Trainer(
316+
default_root_dir=tmpdir,
317+
accelerator='ddp_sharded',
306318
fast_dev_run=2,
307319
gpus=2,
308320
)

0 commit comments

Comments
 (0)