Skip to content

enable canary for EI supported regions #584

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 6 commits into from
Jan 7, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions tests/integ/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@
HOSTING_NO_P2_REGIONS = ['ca-central-1', 'eu-west-2', 'us-west-1', 'eu-central-1']
HOSTING_NO_P3_REGIONS = ['ap-southeast-1', 'ap-southeast-2', 'ap-south-1', 'ca-central-1',
'eu-west-2', 'us-west-1']
# EI is currently only supported in the following regions
# regions were derived from https://aws.amazon.com/machine-learning/elastic-inference/pricing/
EI_SUPPORTED_REGIONS = ['us-east-1', 'us-east-2', 'us-west-2', 'eu-west-1', 'ap-northeast-1', 'ap-northeast-2']

logging.getLogger('boto3').setLevel(logging.INFO)
logging.getLogger('botocore').setLevel(logging.INFO)
Expand Down
5 changes: 5 additions & 0 deletions tests/integ/test_mxnet_train.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
import numpy
import pytest

import tests.integ
from sagemaker.mxnet.estimator import MXNet
from sagemaker.mxnet.model import MXNetModel
from sagemaker.utils import sagemaker_timestamp
Expand Down Expand Up @@ -71,6 +72,10 @@ def test_deploy_model(mxnet_training_job, sagemaker_session):
predictor.predict(data)


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

Expand Down
5 changes: 5 additions & 0 deletions tests/integ/test_tf.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@

import pytest

import tests.integ
from sagemaker.tensorflow import TensorFlow, TensorFlowModel
from sagemaker.utils import sagemaker_timestamp
from tests.integ import DATA_DIR, TRAINING_DEFAULT_TIMEOUT_MINUTES, PYTHON_VERSION
Expand Down Expand Up @@ -76,6 +77,10 @@ def test_deploy_model(sagemaker_session, tf_training_job):
assert dict_result == list_result


@pytest.mark.continuous_testing
@pytest.mark.regional_testing
@pytest.mark.skipif(tests.integ.test_region() not in tests.integ.EI_SUPPORTED_REGIONS,
reason="EI isn't supported in that specific region.")
@pytest.mark.skipif(PYTHON_VERSION != 'py2', reason="TensorFlow image supports only python 2.")
def test_deploy_model_with_accelerator(sagemaker_session, tf_training_job, ei_tf_version):
endpoint_name = 'test-tf-deploy-model-ei-{}'.format(sagemaker_timestamp())
Expand Down