2525
2626from e2e import (
2727 service_marker ,
28- ENDPOINT_CONFIG_RESOURCE_PLURAL ,
29- MODEL_RESOURCE_PLURAL ,
30- ENDPOINT_RESOURCE_PLURAL ,
3128 create_sagemaker_resource ,
3229 wait_sagemaker_endpoint_status ,
3330 wait_resource_endpoint_status ,
3431)
3532from e2e .replacement_values import REPLACEMENT_VALUES
33+ from e2e .common import config as cfg
3634
3735FAIL_UPDATE_ERROR_MESSAGE = "unable to update endpoint. check FailureReason"
3836
@@ -49,7 +47,7 @@ def single_container_model(name_suffix):
4947 replacements ["MODEL_NAME" ] = model_resource_name
5048
5149 model_reference , model_spec , model_resource = create_sagemaker_resource (
52- resource_plural = MODEL_RESOURCE_PLURAL ,
50+ resource_plural = cfg . MODEL_RESOURCE_PLURAL ,
5351 resource_name = model_resource_name ,
5452 spec_file = "xgboost_model" ,
5553 replacements = replacements ,
@@ -74,7 +72,7 @@ def multi_variant_config(name_suffix, single_container_model):
7472 replacements ["MODEL_NAME" ] = model_resource_name
7573
7674 config_reference , config_spec , config_resource = create_sagemaker_resource (
77- resource_plural = ENDPOINT_CONFIG_RESOURCE_PLURAL ,
75+ resource_plural = cfg . ENDPOINT_CONFIG_RESOURCE_PLURAL ,
7876 resource_name = config_resource_name ,
7977 spec_file = "endpoint_config_multi_variant" ,
8078 replacements = replacements ,
@@ -99,7 +97,7 @@ def single_variant_config(name_suffix, single_container_model):
9997 replacements ["MODEL_NAME" ] = model_resource_name
10098
10199 config_reference , config_spec , config_resource = create_sagemaker_resource (
102- resource_plural = ENDPOINT_CONFIG_RESOURCE_PLURAL ,
100+ resource_plural = cfg . ENDPOINT_CONFIG_RESOURCE_PLURAL ,
103101 resource_name = config_resource_name ,
104102 spec_file = "endpoint_config_single_variant" ,
105103 replacements = replacements ,
@@ -124,7 +122,7 @@ def xgboost_endpoint(name_suffix, single_variant_config):
124122 replacements ["ENDPOINT_CONFIG_NAME" ] = config_resource_name
125123
126124 reference , spec , resource = create_sagemaker_resource (
127- resource_plural = ENDPOINT_RESOURCE_PLURAL ,
125+ resource_plural = cfg . ENDPOINT_RESOURCE_PLURAL ,
128126 resource_name = endpoint_resource_name ,
129127 spec_file = "endpoint_base" ,
130128 replacements = replacements ,
@@ -157,7 +155,7 @@ def faulty_config(name_suffix, single_container_model):
157155 replacements ["MODEL_NAME" ] = model_resource_name
158156 replacements ["MODEL_LOCATION" ] = f"s3://{ model_bucket } /{ model_destination_key } "
159157 model_reference , model_spec , model_resource = create_sagemaker_resource (
160- resource_plural = MODEL_RESOURCE_PLURAL ,
158+ resource_plural = cfg . MODEL_RESOURCE_PLURAL ,
161159 resource_name = model_resource_name ,
162160 spec_file = "xgboost_model_with_model_location" ,
163161 replacements = replacements ,
@@ -174,7 +172,7 @@ def faulty_config(name_suffix, single_container_model):
174172 replacements ["ENDPOINT_CONFIG_NAME" ] = config_resource_name
175173
176174 config_reference , config_spec , config_resource = create_sagemaker_resource (
177- resource_plural = ENDPOINT_CONFIG_RESOURCE_PLURAL ,
175+ resource_plural = cfg . ENDPOINT_CONFIG_RESOURCE_PLURAL ,
178176 resource_name = config_resource_name ,
179177 spec_file = "endpoint_config_multi_variant" ,
180178 replacements = replacements ,
0 commit comments