Skip to content

Commit 537aec0

Browse files
Merge branch 'master' into master
2 parents e5dfc9e + bcb9216 commit 537aec0

File tree

3 files changed

+16
-14
lines changed

3 files changed

+16
-14
lines changed

tests/conftest.py

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -37,13 +37,15 @@ def pytest_addoption(parser):
3737
parser.addoption('--boto-config', action='store', default=None)
3838
parser.addoption('--chainer-full-version', action='store', default=Chainer.LATEST_VERSION)
3939
parser.addoption('--mxnet-full-version', action='store', default=MXNet.LATEST_VERSION)
40+
parser.addoption('--ei-mxnet-full-version', action='store', default=MXNet.LATEST_VERSION)
4041
parser.addoption('--pytorch-full-version', action='store', default=PyTorch.LATEST_VERSION)
4142
parser.addoption('--rl-coach-full-version', action='store',
4243
default=RLEstimator.COACH_LATEST_VERSION)
4344
parser.addoption('--rl-ray-full-version', action='store',
4445
default=RLEstimator.RAY_LATEST_VERSION)
4546
parser.addoption('--sklearn-full-version', action='store', default=SKLEARN_VERSION)
4647
parser.addoption('--tf-full-version', action='store', default=TensorFlow.LATEST_VERSION)
48+
parser.addoption('--ei-tf-full-version', action='store', default=TensorFlow.LATEST_VERSION)
4749

4850

4951
def pytest_configure(config):
@@ -109,11 +111,6 @@ def mxnet_version(request):
109111
return request.param
110112

111113

112-
@pytest.fixture(scope='module', params=['1.3', '1.3.0'])
113-
def ei_mxnet_version(request):
114-
return request.param
115-
116-
117114
@pytest.fixture(scope='module', params=['0.4', '0.4.0', '1.0', '1.0.0'])
118115
def pytorch_version(request):
119116
return request.param
@@ -131,11 +128,6 @@ def tf_version(request):
131128
return request.param
132129

133130

134-
@pytest.fixture(scope='module', params=['1.12', '1.12.0'])
135-
def ei_tf_version(request):
136-
return request.param
137-
138-
139131
@pytest.fixture(scope='module', params=['0.10.1', '0.10.1', '0.11', '0.11.0'])
140132
def rl_coach_tf_version(request):
141133
return request.param
@@ -161,6 +153,11 @@ def mxnet_full_version(request):
161153
return request.config.getoption('--mxnet-full-version')
162154

163155

156+
@pytest.fixture(scope='module')
157+
def ei_mxnet_full_version(request):
158+
return request.config.getoption('--ei-mxnet-full-version')
159+
160+
164161
@pytest.fixture(scope='module')
165162
def pytorch_full_version(request):
166163
return request.config.getoption('--pytorch-full-version')
@@ -184,3 +181,8 @@ def sklearn_full_version(request):
184181
@pytest.fixture(scope='module')
185182
def tf_full_version(request):
186183
return request.config.getoption('--tf-full-version')
184+
185+
186+
@pytest.fixture(scope='module')
187+
def ei_tf_full_version(request):
188+
return request.config.getoption('--ei-tf-full-version')

tests/integ/test_mxnet_train.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -121,15 +121,15 @@ def test_deploy_model_with_update_non_existing_endpoint(mxnet_training_job, sage
121121
@pytest.mark.regional_testing
122122
@pytest.mark.skipif(tests.integ.test_region() not in tests.integ.EI_SUPPORTED_REGIONS,
123123
reason="EI isn't supported in that specific region.")
124-
def test_deploy_model_with_accelerator(mxnet_training_job, sagemaker_session, ei_mxnet_version):
124+
def test_deploy_model_with_accelerator(mxnet_training_job, sagemaker_session, ei_mxnet_full_version):
125125
endpoint_name = 'test-mxnet-deploy-model-ei-{}'.format(sagemaker_timestamp())
126126

127127
with timeout_and_delete_endpoint_by_name(endpoint_name, sagemaker_session):
128128
desc = sagemaker_session.sagemaker_client.describe_training_job(TrainingJobName=mxnet_training_job)
129129
model_data = desc['ModelArtifacts']['S3ModelArtifacts']
130130
script_path = os.path.join(DATA_DIR, 'mxnet_mnist', 'mnist.py')
131131
model = MXNetModel(model_data, 'SageMakerRole', entry_point=script_path,
132-
framework_version=ei_mxnet_version, py_version=PYTHON_VERSION,
132+
framework_version=ei_mxnet_full_version, py_version=PYTHON_VERSION,
133133
sagemaker_session=sagemaker_session)
134134
predictor = model.deploy(1, 'ml.m4.xlarge', endpoint_name=endpoint_name, accelerator_type='ml.eia1.medium')
135135

tests/integ/test_tf.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ def test_deploy_model(sagemaker_session, tf_training_job):
8383
@pytest.mark.skipif(tests.integ.test_region() not in tests.integ.EI_SUPPORTED_REGIONS,
8484
reason="EI isn't supported in that specific region.")
8585
@pytest.mark.skipif(PYTHON_VERSION != 'py2', reason="TensorFlow image supports only python 2.")
86-
def test_deploy_model_with_accelerator(sagemaker_session, tf_training_job, ei_tf_version):
86+
def test_deploy_model_with_accelerator(sagemaker_session, tf_training_job, ei_tf_full_version):
8787
endpoint_name = 'test-tf-deploy-model-ei-{}'.format(sagemaker_timestamp())
8888

8989
with timeout_and_delete_endpoint_by_name(endpoint_name, sagemaker_session):
@@ -92,7 +92,7 @@ def test_deploy_model_with_accelerator(sagemaker_session, tf_training_job, ei_tf
9292

9393
script_path = os.path.join(DATA_DIR, 'iris', 'iris-dnn-classifier.py')
9494
model = TensorFlowModel(model_data, 'SageMakerRole', entry_point=script_path,
95-
framework_version=ei_tf_version, sagemaker_session=sagemaker_session)
95+
framework_version=ei_tf_full_version, sagemaker_session=sagemaker_session)
9696

9797
json_predictor = model.deploy(initial_instance_count=1, instance_type='ml.c4.xlarge',
9898
endpoint_name=endpoint_name, accelerator_type='ml.eia1.medium')

0 commit comments

Comments
 (0)