Skip to content

Commit 3b563e3

Browse files
author
Dan Choi
committed
fix logic and add doc for region
1 parent 6bd4e4b commit 3b563e3

File tree

3 files changed

+3
-2
lines changed

3 files changed

+3
-2
lines changed

tests/integ/__init__.py

+1
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@
2929
HOSTING_NO_P3_REGIONS = ['ap-southeast-1', 'ap-southeast-2', 'ap-south-1', 'ca-central-1',
3030
'eu-west-2', 'us-west-1']
3131
# EI is currently only supported in the following regions
32+
# regions were derived from https://aws.amazon.com/machine-learning/elastic-inference/pricing/
3233
EI_SUPPORTED_REGIONS = ['us-east-1', 'us-east-2', 'us-west-2', 'eu-west-1', 'ap-northeast-1', 'ap-northeast-2']
3334

3435
logging.getLogger('boto3').setLevel(logging.INFO)

tests/integ/test_mxnet_train.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ def test_deploy_model(mxnet_training_job, sagemaker_session):
7474

7575
@pytest.continous_testing
7676
@pytest.regional_testing
77-
@pytest.mark.skipif(tests.integ.test_region() in tests.integ.EI_SUPPORTED_REGIONS,
77+
@pytest.mark.skipif(tests.integ.test_region() not in tests.integ.EI_SUPPORTED_REGIONS,
7878
reason="EI isn't supported in that specific region.")
7979
def test_deploy_model_with_accelerator(mxnet_training_job, sagemaker_session, ei_mxnet_version):
8080
endpoint_name = 'test-mxnet-deploy-model-ei-{}'.format(sagemaker_timestamp())

tests/integ/test_tf.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ def test_deploy_model(sagemaker_session, tf_training_job):
7979

8080
@pytest.continous_testing
8181
@pytest.regional_testing
82-
@pytest.mark.skipif(tests.integ.test_region() in tests.integ.EI_SUPPORTED_REGIONS,
82+
@pytest.mark.skipif(tests.integ.test_region() not in tests.integ.EI_SUPPORTED_REGIONS,
8383
reason="EI isn't supported in that specific region.")
8484
@pytest.mark.skipif(PYTHON_VERSION != 'py2', reason="TensorFlow image supports only python 2.")
8585
def test_deploy_model_with_accelerator(sagemaker_session, tf_training_job, ei_tf_version):

0 commit comments

Comments
 (0)