Skip to content

Commit 092e2c7

Browse files
authored
change: downgrade c5 in integ tests and test all TF Script Mode images (#840)
1 parent e0b1778 commit 092e2c7

File tree

2 files changed

+8
-14
lines changed

2 files changed

+8
-14
lines changed

tests/integ/test_horovod.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright 2017-2018 Amazon.com, Inc. or its affiliates. All Rights Reserved.
1+
# Copyright 2017-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved.
22
#
33
# Licensed under the Apache License, Version 2.0 (the "License"). You
44
# may not use this file except in compliance with the License. A copy of
@@ -29,7 +29,7 @@
2929

3030

3131
@pytest.fixture(scope='session', params=[
32-
'ml.c5.xlarge',
32+
'ml.c4.xlarge',
3333
pytest.param('ml.p3.2xlarge',
3434
marks=pytest.mark.skipif(
3535
test_region() in HOSTING_NO_P3_REGIONS,

tests/integ/test_tf_script_mode.py

+6-12
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright 2017-2018 Amazon.com, Inc. or its affiliates. All Rights Reserved.
1+
# Copyright 2017-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved.
22
#
33
# Licensed under the Apache License, Version 2.0 (the "License"). You
44
# may not use this file except in compliance with the License. A copy of
@@ -39,7 +39,7 @@
3939

4040

4141
@pytest.fixture(scope='session', params=[
42-
'ml.c5.xlarge',
42+
'ml.c4.xlarge',
4343
pytest.param('ml.p2.xlarge',
4444
marks=pytest.mark.skipif(
4545
tests.integ.test_region() in tests.integ.HOSTING_NO_P2_REGIONS
@@ -49,15 +49,13 @@ def instance_type(request):
4949
return request.param
5050

5151

52-
@pytest.mark.skipif(tests.integ.PYTHON_VERSION != 'py3',
53-
reason="Script Mode tests are only configured to run with Python 3")
5452
def test_mnist(sagemaker_session, instance_type):
5553
estimator = TensorFlow(entry_point=SCRIPT,
5654
role='SageMakerRole',
5755
train_instance_count=1,
5856
train_instance_type=instance_type,
5957
sagemaker_session=sagemaker_session,
60-
py_version='py3',
58+
script_mode=True,
6159
framework_version=TensorFlow.LATEST_VERSION,
6260
metric_definitions=[
6361
{'Name': 'train:global_steps', 'Regex': r'global_step\/sec:\s(.*)'}])
@@ -85,7 +83,7 @@ def test_server_side_encryption(sagemaker_session):
8583
train_instance_count=1,
8684
train_instance_type='ml.c5.xlarge',
8785
sagemaker_session=sagemaker_session,
88-
py_version='py3',
86+
script_mode=True,
8987
framework_version=TensorFlow.LATEST_VERSION,
9088
code_location=output_path,
9189
output_path=output_path,
@@ -102,8 +100,6 @@ def test_server_side_encryption(sagemaker_session):
102100

103101

104102
@pytest.mark.canary_quick
105-
@pytest.mark.skipif(tests.integ.PYTHON_VERSION != 'py3',
106-
reason="Script Mode tests are only configured to run with Python 3")
107103
def test_mnist_distributed(sagemaker_session, instance_type):
108104
estimator = TensorFlow(entry_point=SCRIPT,
109105
role=ROLE,
@@ -130,7 +126,7 @@ def test_mnist_async(sagemaker_session):
130126
train_instance_count=1,
131127
train_instance_type='ml.c5.4xlarge',
132128
sagemaker_session=sagemaker_session,
133-
py_version='py3',
129+
script_mode=True,
134130
framework_version=TensorFlow.LATEST_VERSION,
135131
tags=TAGS)
136132
inputs = estimator.sagemaker_session.upload_data(
@@ -155,16 +151,14 @@ def test_mnist_async(sagemaker_session):
155151
estimator.latest_training_job.name, TAGS)
156152

157153

158-
@pytest.mark.skipif(tests.integ.PYTHON_VERSION != 'py3',
159-
reason="Script Mode tests are only configured to run with Python 3")
160154
def test_deploy_with_input_handlers(sagemaker_session, instance_type):
161155
estimator = TensorFlow(entry_point='inference.py',
162156
source_dir=TFS_RESOURCE_PATH,
163157
role=ROLE,
164158
train_instance_count=1,
165159
train_instance_type=instance_type,
166160
sagemaker_session=sagemaker_session,
167-
py_version='py3',
161+
script_mode=True,
168162
framework_version=TensorFlow.LATEST_VERSION,
169163
tags=TAGS)
170164

0 commit comments

Comments
 (0)