Skip to content

Commit be97f69

Browse files
change: skip p2 tests in ap-south-east (aws#823)
1 parent fbe1802 commit be97f69

File tree

5 files changed

+9
-4
lines changed

5 files changed

+9
-4
lines changed

tests/integ/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828
HOSTING_NO_P2_REGIONS = ['ca-central-1', 'eu-central-1', 'eu-west-2', 'us-west-1']
2929
HOSTING_NO_P3_REGIONS = ['ap-southeast-1', 'ap-southeast-2', 'ap-south-1', 'ca-central-1',
3030
'eu-central-1', 'eu-west-2', 'us-west-1']
31+
TRAINING_NO_P2_REGIONS = ['ap-southeast-1', 'ap-southeast-2']
3132

3233
# EI is currently only supported in the following regions
3334
# regions were derived from https://aws.amazon.com/machine-learning/elastic-inference/pricing/

tests/integ/test_chainer_train.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,8 @@ def test_distributed_cpu_training(sagemaker_session, chainer_full_version):
3636
_run_mnist_training_job(sagemaker_session, "ml.c4.xlarge", 2, chainer_full_version)
3737

3838

39-
@pytest.mark.skipif(tests.integ.test_region() in tests.integ.HOSTING_NO_P2_REGIONS,
39+
@pytest.mark.skipif(tests.integ.test_region() in tests.integ.HOSTING_NO_P2_REGIONS
40+
or tests.integ.test_region() in tests.integ.TRAINING_NO_P2_REGIONS,
4041
reason='no ml.p2 instances in these regions')
4142
def test_distributed_gpu_training(sagemaker_session, chainer_full_version):
4243
_run_mnist_training_job(sagemaker_session, "ml.p2.xlarge", 2, chainer_full_version)

tests/integ/test_pytorch_train.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,8 @@ def test_deploy_model(pytorch_training_job, sagemaker_session):
7575
assert output.shape == (batch_size, 10)
7676

7777

78-
@pytest.mark.skipif(tests.integ.test_region() in tests.integ.HOSTING_NO_P2_REGIONS,
78+
@pytest.mark.skipif(tests.integ.test_region() in tests.integ.HOSTING_NO_P2_REGIONS
79+
or tests.integ.test_region() in tests.integ.TRAINING_NO_P2_REGIONS,
7980
reason='no ml.p2 instances in these regions')
8081
def test_async_fit_deploy(sagemaker_session, pytorch_full_version):
8182
training_job_name = ""

tests/integ/test_tf_cifar.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,8 @@ def __call__(self, data):
3838
@pytest.mark.canary_quick
3939
@pytest.mark.skipif(tests.integ.PYTHON_VERSION != 'py2',
4040
reason="TensorFlow image supports only python 2.")
41-
@pytest.mark.skipif(tests.integ.test_region() in tests.integ.HOSTING_NO_P2_REGIONS,
41+
@pytest.mark.skipif(tests.integ.test_region() in tests.integ.HOSTING_NO_P2_REGIONS
42+
or tests.integ.test_region() in tests.integ.TRAINING_NO_P2_REGIONS,
4243
reason='no ml.p2 instances in these regions')
4344
def test_cifar(sagemaker_session, tf_full_version):
4445
with timeout(minutes=45):

tests/integ/test_tf_script_mode.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,8 @@
4242
'ml.c5.xlarge',
4343
pytest.param('ml.p2.xlarge',
4444
marks=pytest.mark.skipif(
45-
tests.integ.test_region() in tests.integ.HOSTING_NO_P2_REGIONS,
45+
tests.integ.test_region() in tests.integ.HOSTING_NO_P2_REGIONS
46+
or tests.integ.test_region() in tests.integ.TRAINING_NO_P2_REGIONS,
4647
reason='no ml.p2 instances in this region'))])
4748
def instance_type(request):
4849
return request.param

0 commit comments

Comments
 (0)