2626
2727ROLE = "SageMakerRole"
2828PREFIX = "sagemaker/beta-automl-xgboost"
29- HOSTING_INSTANCE_TYPE = "ml.c4.xlarge"
3029AUTO_ML_INSTANCE_TYPE = "ml.m5.2xlarge"
3130INSTANCE_COUNT = 1
3231RESOURCE_POOLS = [{"InstanceType" : AUTO_ML_INSTANCE_TYPE , "PoolSize" : INSTANCE_COUNT }]
@@ -216,7 +215,7 @@ def test_best_candidate(sagemaker_session):
216215 tests .integ .test_region () in tests .integ .NO_AUTO_ML_REGIONS ,
217216 reason = "AutoML is not supported in the region yet." ,
218217)
219- def test_deploy_best_candidate (sagemaker_session ):
218+ def test_deploy_best_candidate (sagemaker_session , cpu_instance_type ):
220219 auto_ml_utils .create_auto_ml_job_if_not_exist (sagemaker_session )
221220
222221 auto_ml = AutoML (
@@ -229,7 +228,7 @@ def test_deploy_best_candidate(sagemaker_session):
229228 auto_ml .deploy (
230229 candidate = best_candidate ,
231230 initial_instance_count = INSTANCE_COUNT ,
232- instance_type = HOSTING_INSTANCE_TYPE ,
231+ instance_type = cpu_instance_type ,
233232 endpoint_name = endpoint_name ,
234233 )
235234
@@ -244,7 +243,7 @@ def test_deploy_best_candidate(sagemaker_session):
244243 tests .integ .test_region () in tests .integ .NO_AUTO_ML_REGIONS ,
245244 reason = "AutoML is not supported in the region yet." ,
246245)
247- def test_candidate_estimator_default_rerun_and_deploy (sagemaker_session ):
246+ def test_candidate_estimator_default_rerun_and_deploy (sagemaker_session , cpu_instance_type ):
248247 auto_ml_utils .create_auto_ml_job_if_not_exist (sagemaker_session )
249248
250249 auto_ml = AutoML (
@@ -261,7 +260,7 @@ def test_candidate_estimator_default_rerun_and_deploy(sagemaker_session):
261260 candidate_estimator .fit (inputs )
262261 auto_ml .deploy (
263262 initial_instance_count = INSTANCE_COUNT ,
264- instance_type = HOSTING_INSTANCE_TYPE ,
263+ instance_type = cpu_instance_type ,
265264 candidate = candidate ,
266265 endpoint_name = endpoint_name ,
267266 )
@@ -277,7 +276,7 @@ def test_candidate_estimator_default_rerun_and_deploy(sagemaker_session):
277276 tests .integ .test_region () in tests .integ .NO_AUTO_ML_REGIONS ,
278277 reason = "AutoML is not supported in the region yet." ,
279278)
280- def test_candidate_estimator_rerun_with_optional_args (sagemaker_session ):
279+ def test_candidate_estimator_rerun_with_optional_args (sagemaker_session , cpu_instance_type ):
281280 auto_ml_utils .create_auto_ml_job_if_not_exist (sagemaker_session )
282281
283282 auto_ml = AutoML (
@@ -294,7 +293,7 @@ def test_candidate_estimator_rerun_with_optional_args(sagemaker_session):
294293 candidate_estimator .fit (inputs , encrypt_inter_container_traffic = True )
295294 auto_ml .deploy (
296295 initial_instance_count = INSTANCE_COUNT ,
297- instance_type = HOSTING_INSTANCE_TYPE ,
296+ instance_type = cpu_instance_type ,
298297 candidate = candidate ,
299298 endpoint_name = endpoint_name ,
300299 )
0 commit comments