2828 build_pydantic_error_message ,
2929 find_restricted_params ,
3030 get_combined_params ,
31+ get_container_env_type ,
3132 get_container_params_type ,
3233 get_ocid_substring ,
3334 get_params_list ,
@@ -390,6 +391,7 @@ def _create(
390391 Tags .AQUA_SERVICE_MODEL_TAG ,
391392 Tags .AQUA_FINE_TUNED_MODEL_TAG ,
392393 Tags .AQUA_TAG ,
394+ Tags .BASE_MODEL_CUSTOM ,
393395 ]:
394396 if tag in aqua_model .freeform_tags :
395397 tags [tag ] = aqua_model .freeform_tags [tag ]
@@ -1051,6 +1053,7 @@ def get_deployment_config(self, model_id: str) -> AquaDeploymentConfig:
10511053 config = self .get_config_from_metadata (
10521054 model_id , AquaModelMetadataKeys .DEPLOYMENT_CONFIGURATION
10531055 ).config
1056+
10541057 if config :
10551058 logger .info (
10561059 f"Fetched { AquaModelMetadataKeys .DEPLOYMENT_CONFIGURATION } from defined metadata for model: { model_id } ."
@@ -1135,7 +1138,7 @@ def get_deployment_default_params(
11351138 model_id : str ,
11361139 instance_shape : str ,
11371140 gpu_count : int = None ,
1138- ) -> List [ str ] :
1141+ ) -> Dict :
11391142 """Gets the default params set in the deployment configs for the given model and instance shape.
11401143
11411144 Parameters
@@ -1157,6 +1160,7 @@ def get_deployment_default_params(
11571160
11581161 """
11591162 default_params = []
1163+ default_envs = {}
11601164 config_params = {}
11611165 model = DataScienceModel .from_id (model_id )
11621166 try :
@@ -1166,19 +1170,15 @@ def get_deployment_default_params(
11661170 except ValueError :
11671171 container_type_key = UNKNOWN
11681172 logger .debug (
1169- f"{ AQUA_DEPLOYMENT_CONTAINER_METADATA_NAME } key is not available in the custom metadata field for model { model_id } ."
1173+ f"{ AQUA_DEPLOYMENT_CONTAINER_METADATA_NAME } key is not available in the "
1174+ f"custom metadata field for model { model_id } ."
11701175 )
11711176
1172- if (
1173- container_type_key
1174- and container_type_key in InferenceContainerTypeFamily .values ()
1175- ):
1177+ if container_type_key :
11761178 deployment_config = self .get_deployment_config (model_id )
1177-
11781179 instance_shape_config = deployment_config .configuration .get (
11791180 instance_shape , ConfigurationItem ()
11801181 )
1181-
11821182 if instance_shape_config .multi_model_deployment and gpu_count :
11831183 gpu_params = instance_shape_config .multi_model_deployment
11841184
@@ -1187,12 +1187,18 @@ def get_deployment_default_params(
11871187 config_params = gpu_config .parameters .get (
11881188 get_container_params_type (container_type_key ), UNKNOWN
11891189 )
1190+ default_envs = instance_shape_config .env .get (
1191+ get_container_env_type (container_type_key ), {}
1192+ )
11901193 break
11911194
11921195 else :
11931196 config_params = instance_shape_config .parameters .get (
11941197 get_container_params_type (container_type_key ), UNKNOWN
11951198 )
1199+ default_envs = instance_shape_config .env .get (
1200+ get_container_env_type (container_type_key ), {}
1201+ )
11961202
11971203 if config_params :
11981204 params_list = get_params_list (config_params )
@@ -1205,7 +1211,7 @@ def get_deployment_default_params(
12051211 if params .split ()[0 ] not in restricted_params_set :
12061212 default_params .append (params )
12071213
1208- return default_params
1214+ return { "data" : default_params , "env" : default_envs }
12091215
12101216 def validate_deployment_params (
12111217 self ,
0 commit comments