File tree Expand file tree Collapse file tree 3 files changed +9
-1
lines changed Expand file tree Collapse file tree 3 files changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -147,6 +147,7 @@ class AquaModelApp(AquaApp):
147147 def create (
148148 self ,
149149 model_id : Union [str , AquaMultiModelRef ],
150+ display_name : Optional [str ] = None ,
150151 project_id : Optional [str ] = None ,
151152 compartment_id : Optional [str ] = None ,
152153 freeform_tags : Optional [Dict ] = None ,
@@ -204,6 +205,9 @@ def create(
204205 ** (defined_tags or {}),
205206 }
206207
208+ if display_name :
209+ service_model .display_name = display_name
210+
207211 custom_model = (
208212 DataScienceModel ()
209213 .with_compartment_id (target_compartment )
Original file line number Diff line number Diff line change @@ -214,6 +214,7 @@ def create(
214214 )
215215 aqua_model = model_app .create (
216216 model_id = create_deployment_details .model_id ,
217+ display_name = create_deployment_details .model_name ,
217218 compartment_id = compartment_id ,
218219 project_id = project_id ,
219220 freeform_tags = freeform_tags ,
@@ -446,6 +447,7 @@ def _create(
446447 cmd_var_string = aqua_model .custom_metadata_list .get (
447448 AQUA_DEPLOYMENT_CONTAINER_CMD_VAR_METADATA_NAME
448449 ).value
450+
449451 default_cmd_var = shlex .split (cmd_var_string )
450452 if default_cmd_var :
451453 cmd_var = validate_cmd_var (default_cmd_var , cmd_var )
@@ -538,7 +540,6 @@ def _create(
538540 )
539541
540542 deployment_params = get_combined_params (config_params , user_params )
541-
542543 params = f"{ params } { deployment_params } " .strip ()
543544 if params :
544545 env_var .update ({"PARAMS" : params })
Original file line number Diff line number Diff line change @@ -233,6 +233,9 @@ class CreateModelDeploymentDetails(BaseModel):
233233 None , description = "The description of the deployment."
234234 )
235235 model_id : Optional [str ] = Field (None , description = "The model OCID to deploy." )
236+ model_name : Optional [str ] = Field (
237+ None , description = "The model name specified by user to deploy."
238+ )
236239 models : Optional [List [AquaMultiModelRef ]] = Field (
237240 None , description = "List of models for multimodel deployment."
238241 )
You can’t perform that action at this time.
0 commit comments