diff --git a/tests/tests_pytorch/helpers/runif.py b/tests/tests_pytorch/helpers/runif.py index 8286d7d558..d8e38e7101 100644 --- a/tests/tests_pytorch/helpers/runif.py +++ b/tests/tests_pytorch/helpers/runif.py @@ -127,8 +127,7 @@ class RunIf: reasons = [] if min_cuda_gpus: - env_flag = os.getenv("PL_RUN_CUDA_TESTS", "0") - conditions.append(env_flag != "1" or torch.cuda.device_count() < min_cuda_gpus) + conditions.append(torch.cuda.device_count() < min_cuda_gpus) reasons.append(f"GPUs>={min_cuda_gpus}") # used in conftest.py::pytest_collection_modifyitems kwargs["min_cuda_gpus"] = True @@ -180,8 +179,7 @@ class RunIf: reasons.append("TPU") if ipu: - env_flag = os.getenv("PL_RUN_IPU_TESTS", "0") - conditions.append(env_flag != "1" or not _IPU_AVAILABLE) + conditions.append(not _IPU_AVAILABLE) reasons.append("IPU") # used in conftest.py::pytest_collection_modifyitems kwargs["ipu"] = True diff --git a/tests/tests_pytorch/run_standalone_tests.sh b/tests/tests_pytorch/run_standalone_tests.sh index 76bf460915..45264bb74a 100644 --- a/tests/tests_pytorch/run_standalone_tests.sh +++ b/tests/tests_pytorch/run_standalone_tests.sh @@ -101,7 +101,7 @@ report+="Ran\tplugins/environments/torch_elastic_deadlock.py\n" # test that a user can manually launch individual processes export PYTHONPATH="${PYTHONPATH}:$(pwd)" -args="--trainer.gpus 2 --trainer.strategy ddp --trainer.max_epochs=1 --trainer.limit_train_batches=1 --trainer.limit_val_batches=1 --trainer.limit_test_batches=1" +args="--trainer.accelerator gpu --trainer.devices 2 --trainer.strategy ddp --trainer.max_epochs=1 --trainer.limit_train_batches=1 --trainer.limit_val_batches=1 --trainer.limit_test_batches=1" MASTER_ADDR="localhost" MASTER_PORT=1234 LOCAL_RANK=1 python ../../examples/convert_from_pt_to_pl/image_classifier_5_lightning_datamodule.py ${args} & MASTER_ADDR="localhost" MASTER_PORT=1234 LOCAL_RANK=0 python ../../examples/convert_from_pt_to_pl/image_classifier_5_lightning_datamodule.py ${args} report+="Ran\tmanual ddp launch test\n"