2727 build_pydantic_error_message ,
2828 find_restricted_params ,
2929 get_combined_params ,
30+  get_container_env_type ,
3031 get_container_params_type ,
3132 get_ocid_substring ,
3233 get_params_list ,
@@ -199,7 +200,7 @@ def create(
199200 if  create_deployment_details .instance_shape .lower () not  in available_shapes :
200201 raise  AquaValueError (
201202 f"Invalid Instance Shape. The selected shape '{ create_deployment_details .instance_shape }  
202-  f"is not available  in the { self .region }  
203+  f"is not supported  in the { self .region }  
203204 )
204205
205206 # Get container config 
@@ -381,6 +382,7 @@ def _create(
381382 Tags .AQUA_SERVICE_MODEL_TAG ,
382383 Tags .AQUA_FINE_TUNED_MODEL_TAG ,
383384 Tags .AQUA_TAG ,
385+  Tags .BASE_MODEL_CUSTOM ,
384386 ]:
385387 if  tag  in  aqua_model .freeform_tags :
386388 tags [tag ] =  aqua_model .freeform_tags [tag ]
@@ -1042,6 +1044,7 @@ def get_deployment_config(self, model_id: str) -> AquaDeploymentConfig:
10421044 config  =  self .get_config_from_metadata (
10431045 model_id , AquaModelMetadataKeys .DEPLOYMENT_CONFIGURATION 
10441046 ).config 
1047+ 
10451048 if  config :
10461049 logger .info (
10471050 f"Fetched { AquaModelMetadataKeys .DEPLOYMENT_CONFIGURATION } { model_id }  
@@ -1126,7 +1129,7 @@ def get_deployment_default_params(
11261129 model_id : str ,
11271130 instance_shape : str ,
11281131 gpu_count : int  =  None ,
1129-  ) ->  List [ str ] :
1132+  ) ->  Dict :
11301133 """Gets the default params set in the deployment configs for the given model and instance shape. 
11311134
11321135 Parameters 
@@ -1148,6 +1151,7 @@ def get_deployment_default_params(
11481151
11491152 """ 
11501153 default_params  =  []
1154+  default_envs  =  {}
11511155 config_params  =  {}
11521156 model  =  DataScienceModel .from_id (model_id )
11531157 try :
@@ -1157,19 +1161,15 @@ def get_deployment_default_params(
11571161 except  ValueError :
11581162 container_type_key  =  UNKNOWN 
11591163 logger .debug (
1160-  f"{ AQUA_DEPLOYMENT_CONTAINER_METADATA_NAME } { model_id }  
1164+  f"{ AQUA_DEPLOYMENT_CONTAINER_METADATA_NAME }  
1165+  f"custom metadata field for model { model_id }  
11611166 )
11621167
1163-  if  (
1164-  container_type_key 
1165-  and  container_type_key  in  InferenceContainerTypeFamily .values ()
1166-  ):
1168+  if  container_type_key :
11671169 deployment_config  =  self .get_deployment_config (model_id )
1168- 
11691170 instance_shape_config  =  deployment_config .configuration .get (
11701171 instance_shape , ConfigurationItem ()
11711172 )
1172- 
11731173 if  instance_shape_config .multi_model_deployment  and  gpu_count :
11741174 gpu_params  =  instance_shape_config .multi_model_deployment 
11751175
@@ -1178,12 +1178,18 @@ def get_deployment_default_params(
11781178 config_params  =  gpu_config .parameters .get (
11791179 get_container_params_type (container_type_key ), UNKNOWN 
11801180 )
1181+  default_envs  =  instance_shape_config .env .get (
1182+  get_container_env_type (container_type_key ), {}
1183+  )
11811184 break 
11821185
11831186 else :
11841187 config_params  =  instance_shape_config .parameters .get (
11851188 get_container_params_type (container_type_key ), UNKNOWN 
11861189 )
1190+  default_envs  =  instance_shape_config .env .get (
1191+  get_container_env_type (container_type_key ), {}
1192+  )
11871193
11881194 if  config_params :
11891195 params_list  =  get_params_list (config_params )
@@ -1196,7 +1202,7 @@ def get_deployment_default_params(
11961202 if  params .split ()[0 ] not  in restricted_params_set :
11971203 default_params .append (params )
11981204
1199-  return  default_params 
1205+  return  { "data" :  default_params ,  "env" :  default_envs } 
12001206
12011207 def  validate_deployment_params (
12021208 self ,
0 commit comments