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.
2
2
#
3
3
# Licensed under the Apache License, Version 2.0 (the "License"). You
4
4
# may not use this file except in compliance with the License. A copy of
39
39
40
40
41
41
@pytest .fixture (scope = 'session' , params = [
42
- 'ml.c5 .xlarge' ,
42
+ 'ml.c4 .xlarge' ,
43
43
pytest .param ('ml.p2.xlarge' ,
44
44
marks = pytest .mark .skipif (
45
45
tests .integ .test_region () in tests .integ .HOSTING_NO_P2_REGIONS
@@ -49,15 +49,13 @@ def instance_type(request):
49
49
return request .param
50
50
51
51
52
- @pytest .mark .skipif (tests .integ .PYTHON_VERSION != 'py3' ,
53
- reason = "Script Mode tests are only configured to run with Python 3" )
54
52
def test_mnist (sagemaker_session , instance_type ):
55
53
estimator = TensorFlow (entry_point = SCRIPT ,
56
54
role = 'SageMakerRole' ,
57
55
train_instance_count = 1 ,
58
56
train_instance_type = instance_type ,
59
57
sagemaker_session = sagemaker_session ,
60
- py_version = 'py3' ,
58
+ script_mode = True ,
61
59
framework_version = TensorFlow .LATEST_VERSION ,
62
60
metric_definitions = [
63
61
{'Name' : 'train:global_steps' , 'Regex' : r'global_step\/sec:\s(.*)' }])
@@ -85,7 +83,7 @@ def test_server_side_encryption(sagemaker_session):
85
83
train_instance_count = 1 ,
86
84
train_instance_type = 'ml.c5.xlarge' ,
87
85
sagemaker_session = sagemaker_session ,
88
- py_version = 'py3' ,
86
+ script_mode = True ,
89
87
framework_version = TensorFlow .LATEST_VERSION ,
90
88
code_location = output_path ,
91
89
output_path = output_path ,
@@ -102,8 +100,6 @@ def test_server_side_encryption(sagemaker_session):
102
100
103
101
104
102
@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" )
107
103
def test_mnist_distributed (sagemaker_session , instance_type ):
108
104
estimator = TensorFlow (entry_point = SCRIPT ,
109
105
role = ROLE ,
@@ -130,7 +126,7 @@ def test_mnist_async(sagemaker_session):
130
126
train_instance_count = 1 ,
131
127
train_instance_type = 'ml.c5.4xlarge' ,
132
128
sagemaker_session = sagemaker_session ,
133
- py_version = 'py3' ,
129
+ script_mode = True ,
134
130
framework_version = TensorFlow .LATEST_VERSION ,
135
131
tags = TAGS )
136
132
inputs = estimator .sagemaker_session .upload_data (
@@ -155,16 +151,14 @@ def test_mnist_async(sagemaker_session):
155
151
estimator .latest_training_job .name , TAGS )
156
152
157
153
158
- @pytest .mark .skipif (tests .integ .PYTHON_VERSION != 'py3' ,
159
- reason = "Script Mode tests are only configured to run with Python 3" )
160
154
def test_deploy_with_input_handlers (sagemaker_session , instance_type ):
161
155
estimator = TensorFlow (entry_point = 'inference.py' ,
162
156
source_dir = TFS_RESOURCE_PATH ,
163
157
role = ROLE ,
164
158
train_instance_count = 1 ,
165
159
train_instance_type = instance_type ,
166
160
sagemaker_session = sagemaker_session ,
167
- py_version = 'py3' ,
161
+ script_mode = True ,
168
162
framework_version = TensorFlow .LATEST_VERSION ,
169
163
tags = TAGS )
170
164
0 commit comments