test/hotfix: DDPSpawnStrategy (#16889)
This commit is contained in:
parent
52a39c03f8
commit
8884c8970c
|
@ -52,7 +52,7 @@ class _LightningTrainerRunExecutor(_PyTorchSpawnRunExecutor):
|
||||||
try:
|
try:
|
||||||
pkg = importlib.import_module(pkg_name)
|
pkg = importlib.import_module(pkg_name)
|
||||||
trainers.append(pkg.Trainer)
|
trainers.append(pkg.Trainer)
|
||||||
strategies.append(pkg.strategies.DDPSpawnStrategy)
|
strategies.append(pkg.strategies.DDPStrategy)
|
||||||
mps_accelerators.append(pkg.accelerators.MPSAccelerator)
|
mps_accelerators.append(pkg.accelerators.MPSAccelerator)
|
||||||
except (ImportError, ModuleNotFoundError):
|
except (ImportError, ModuleNotFoundError):
|
||||||
continue
|
continue
|
||||||
|
|
|
@ -93,4 +93,4 @@ def test_trainer_run_executor_arguments_choices(
|
||||||
@pytest.mark.skipif(not module_available("lightning"), reason="lightning not available")
|
@pytest.mark.skipif(not module_available("lightning"), reason="lightning not available")
|
||||||
def test_trainer_run_executor_invalid_strategy_instances():
|
def test_trainer_run_executor_invalid_strategy_instances():
|
||||||
with pytest.raises(ValueError, match="DDP Spawned strategies aren't supported yet."):
|
with pytest.raises(ValueError, match="DDP Spawned strategies aren't supported yet."):
|
||||||
_, _ = _get_args_after_tracer_injection(strategy=pl.strategies.DDPSpawnStrategy())
|
_, _ = _get_args_after_tracer_injection(strategy=pl.strategies.DDPStrategy(start_method="spawn"))
|
||||||
|
|
Loading…
Reference in New Issue