diff --git a/tests/integ/__init__.py b/tests/integ/__init__.py index 9a3d99c681..36c2a6e518 100644 --- a/tests/integ/__init__.py +++ b/tests/integ/__init__.py @@ -28,6 +28,7 @@ HOSTING_NO_P2_REGIONS = ['ca-central-1', 'eu-central-1', 'eu-west-2', 'us-west-1'] HOSTING_NO_P3_REGIONS = ['ap-southeast-1', 'ap-southeast-2', 'ap-south-1', 'ca-central-1', 'eu-central-1', 'eu-west-2', 'us-west-1'] +TRAINING_NO_P2_REGIONS = ['ap-southeast-1', 'ap-southeast-2'] # EI is currently only supported in the following regions # regions were derived from https://aws.amazon.com/machine-learning/elastic-inference/pricing/ diff --git a/tests/integ/test_chainer_train.py b/tests/integ/test_chainer_train.py index 0d39e17245..515b7cc05a 100644 --- a/tests/integ/test_chainer_train.py +++ b/tests/integ/test_chainer_train.py @@ -36,7 +36,8 @@ def test_distributed_cpu_training(sagemaker_session, chainer_full_version): _run_mnist_training_job(sagemaker_session, "ml.c4.xlarge", 2, chainer_full_version) -@pytest.mark.skipif(tests.integ.test_region() in tests.integ.HOSTING_NO_P2_REGIONS, +@pytest.mark.skipif(tests.integ.test_region() in tests.integ.HOSTING_NO_P2_REGIONS + or tests.integ.test_region() in tests.integ.TRAINING_NO_P2_REGIONS, reason='no ml.p2 instances in these regions') def test_distributed_gpu_training(sagemaker_session, chainer_full_version): _run_mnist_training_job(sagemaker_session, "ml.p2.xlarge", 2, chainer_full_version) diff --git a/tests/integ/test_pytorch_train.py b/tests/integ/test_pytorch_train.py index c65f89d788..847372d76d 100644 --- a/tests/integ/test_pytorch_train.py +++ b/tests/integ/test_pytorch_train.py @@ -75,7 +75,8 @@ def test_deploy_model(pytorch_training_job, sagemaker_session): assert output.shape == (batch_size, 10) -@pytest.mark.skipif(tests.integ.test_region() in tests.integ.HOSTING_NO_P2_REGIONS, +@pytest.mark.skipif(tests.integ.test_region() in tests.integ.HOSTING_NO_P2_REGIONS + or tests.integ.test_region() in tests.integ.TRAINING_NO_P2_REGIONS, reason='no ml.p2 instances in these regions') def test_async_fit_deploy(sagemaker_session, pytorch_full_version): training_job_name = "" diff --git a/tests/integ/test_tf_cifar.py b/tests/integ/test_tf_cifar.py index a0b24cb269..032b2cd962 100644 --- a/tests/integ/test_tf_cifar.py +++ b/tests/integ/test_tf_cifar.py @@ -38,7 +38,8 @@ def __call__(self, data): @pytest.mark.canary_quick @pytest.mark.skipif(tests.integ.PYTHON_VERSION != 'py2', reason="TensorFlow image supports only python 2.") -@pytest.mark.skipif(tests.integ.test_region() in tests.integ.HOSTING_NO_P2_REGIONS, +@pytest.mark.skipif(tests.integ.test_region() in tests.integ.HOSTING_NO_P2_REGIONS + or tests.integ.test_region() in tests.integ.TRAINING_NO_P2_REGIONS, reason='no ml.p2 instances in these regions') def test_cifar(sagemaker_session, tf_full_version): with timeout(minutes=45): diff --git a/tests/integ/test_tf_script_mode.py b/tests/integ/test_tf_script_mode.py index 489a52848b..a16b337add 100644 --- a/tests/integ/test_tf_script_mode.py +++ b/tests/integ/test_tf_script_mode.py @@ -42,7 +42,8 @@ 'ml.c5.xlarge', pytest.param('ml.p2.xlarge', marks=pytest.mark.skipif( - tests.integ.test_region() in tests.integ.HOSTING_NO_P2_REGIONS, + tests.integ.test_region() in tests.integ.HOSTING_NO_P2_REGIONS + or tests.integ.test_region() in tests.integ.TRAINING_NO_P2_REGIONS, reason='no ml.p2 instances in this region'))]) def instance_type(request): return request.param