Skip to content

Commit 6bd4e4b

Browse files
author
Dan Choi
committed
enable canary for EI supported regions
1 parent 63a22d6 commit 6bd4e4b

File tree

3 files changed

+12
-0
lines changed

3 files changed

+12
-0
lines changed

tests/integ/__init__.py

+2
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,8 @@
2828
HOSTING_NO_P2_REGIONS = ['ca-central-1', 'eu-west-2', 'us-west-1', 'eu-central-1']
2929
HOSTING_NO_P3_REGIONS = ['ap-southeast-1', 'ap-southeast-2', 'ap-south-1', 'ca-central-1',
3030
'eu-west-2', 'us-west-1']
31+
# EI is currently only supported in the following regions
32+
EI_SUPPORTED_REGIONS = ['us-east-1', 'us-east-2', 'us-west-2', 'eu-west-1', 'ap-northeast-1', 'ap-northeast-2']
3133

3234
logging.getLogger('boto3').setLevel(logging.INFO)
3335
logging.getLogger('botocore').setLevel(logging.INFO)

tests/integ/test_mxnet_train.py

+5
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
import numpy
1919
import pytest
2020

21+
import tests.integ
2122
from sagemaker.mxnet.estimator import MXNet
2223
from sagemaker.mxnet.model import MXNetModel
2324
from sagemaker.utils import sagemaker_timestamp
@@ -71,6 +72,10 @@ def test_deploy_model(mxnet_training_job, sagemaker_session):
7172
predictor.predict(data)
7273

7374

75+
@pytest.continous_testing
76+
@pytest.regional_testing
77+
@pytest.mark.skipif(tests.integ.test_region() in tests.integ.EI_SUPPORTED_REGIONS,
78+
reason="EI isn't supported in that specific region.")
7479
def test_deploy_model_with_accelerator(mxnet_training_job, sagemaker_session, ei_mxnet_version):
7580
endpoint_name = 'test-mxnet-deploy-model-ei-{}'.format(sagemaker_timestamp())
7681

tests/integ/test_tf.py

+5
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717

1818
import pytest
1919

20+
import tests.integ
2021
from sagemaker.tensorflow import TensorFlow, TensorFlowModel
2122
from sagemaker.utils import sagemaker_timestamp
2223
from tests.integ import DATA_DIR, TRAINING_DEFAULT_TIMEOUT_MINUTES, PYTHON_VERSION
@@ -76,6 +77,10 @@ def test_deploy_model(sagemaker_session, tf_training_job):
7677
assert dict_result == list_result
7778

7879

80+
@pytest.continous_testing
81+
@pytest.regional_testing
82+
@pytest.mark.skipif(tests.integ.test_region() in tests.integ.EI_SUPPORTED_REGIONS,
83+
reason="EI isn't supported in that specific region.")
7984
@pytest.mark.skipif(PYTHON_VERSION != 'py2', reason="TensorFlow image supports only python 2.")
8085
def test_deploy_model_with_accelerator(sagemaker_session, tf_training_job, ei_tf_version):
8186
endpoint_name = 'test-tf-deploy-model-ei-{}'.format(sagemaker_timestamp())

0 commit comments

Comments
 (0)