@@ -154,12 +154,14 @@ def test_mnist_async(sagemaker_session):
154154 estimator .latest_training_job .name , TAGS )
155155
156156
157- def test_deploy_with_input_handlers (sagemaker_session ):
157+ @pytest .mark .skipif (tests .integ .PYTHON_VERSION != 'py3' ,
158+ reason = "Script Mode tests are only configured to run with Python 3" )
159+ def test_deploy_with_input_handlers (sagemaker_session , instance_type ):
158160 estimator = TensorFlow (entry_point = 'inference.py' ,
159161 source_dir = TFS_RESOURCE_PATH ,
160162 role = ROLE ,
161163 train_instance_count = 1 ,
162- train_instance_type = 'ml.c5.4xlarge' ,
164+ train_instance_type = instance_type ,
163165 sagemaker_session = sagemaker_session ,
164166 py_version = 'py3' ,
165167 framework_version = TensorFlow .LATEST_VERSION ,
@@ -171,7 +173,7 @@ def test_deploy_with_input_handlers(sagemaker_session):
171173
172174 with timeout .timeout_and_delete_endpoint_by_name (endpoint_name , sagemaker_session ):
173175
174- predictor = estimator .deploy (initial_instance_count = 1 , instance_type = 'ml.c5.4xlarge' ,
176+ predictor = estimator .deploy (initial_instance_count = 1 , instance_type = instance_type ,
175177 endpoint_name = endpoint_name )
176178
177179 input_data = {'instances' : [1.0 , 2.0 , 5.0 ]}
0 commit comments