6060 AquaDeploymentDetail ,
6161 ConfigurationItem ,
6262 ConfigValidationError ,
63- CreateModelDeploymentDetails ,
6463 ModelDeploymentConfigSummary ,
65- UpdateModelDeploymentDetails ,
64+ ModelDeploymentCreateSpec ,
65+ ModelDeploymentUpdateSpec ,
6666)
6767from ads .aqua .modeldeployment .utils import MultiModelDeploymentConfigLoader
6868from ads .common .object_storage_details import ObjectStorageDetails
@@ -120,16 +120,16 @@ class AquaDeploymentApp(AquaApp):
120120 @telemetry (entry_point = "plugin=deployment&action=create" , name = "aqua" )
121121 def create (
122122 self ,
123- create_deployment_details : Optional [CreateModelDeploymentDetails ] = None ,
123+ create_deployment_details : Optional [ModelDeploymentCreateSpec ] = None ,
124124 ** kwargs ,
125125 ) -> "AquaDeployment" :
126126 """
127127 Creates a new Aqua model deployment.\n
128128 For detailed information about CLI flags see: https://github.com/oracle-samples/oci-data-science-ai-samples/blob/main/ai-quick-actions/cli-tips.md#create-model-deployment
129129
130130 Args:
131- create_deployment_details : CreateModelDeploymentDetails , optional
132- An instance of CreateModelDeploymentDetails containing all required and optional
131+ create_deployment_details : ModelDeploymentCreateSpec , optional
132+ An instance of ModelDeploymentCreateSpec containing all required and optional
133133 fields for creating a model deployment via Aqua.
134134 kwargs:
135135 instance_shape (str): The instance shape used for deployment.
@@ -166,7 +166,7 @@ def create(
166166 # Build deployment details from kwargs if not explicitly provided.
167167 if create_deployment_details is None :
168168 try :
169- create_deployment_details = CreateModelDeploymentDetails (** kwargs )
169+ create_deployment_details = ModelDeploymentCreateSpec (** kwargs )
170170 except ValidationError as ex :
171171 custom_errors = build_pydantic_error_message (ex )
172172 raise AquaValueError (
@@ -316,7 +316,7 @@ def create(
316316 def _create (
317317 self ,
318318 aqua_model : DataScienceModel ,
319- create_deployment_details : CreateModelDeploymentDetails ,
319+ create_deployment_details : ModelDeploymentCreateSpec ,
320320 container_config : Dict ,
321321 ) -> AquaDeployment :
322322 """Builds the configurations required by single model deployment and creates the deployment.
@@ -325,8 +325,8 @@ def _create(
325325 ----------
326326 aqua_model : DataScienceModel
327327 An instance of Aqua data science model.
328- create_deployment_details : CreateModelDeploymentDetails
329- An instance of CreateModelDeploymentDetails containing all required and optional
328+ create_deployment_details : ModelDeploymentCreateSpec
329+ An instance of ModelDeploymentCreateSpec containing all required and optional
330330 fields for creating a model deployment via Aqua.
331331 container_config: Dict
332332 Container config dictionary.
@@ -345,7 +345,7 @@ def _create(
345345 env_var ,
346346 tags ,
347347 cmd_var ,
348- ) = self ._get_container_details (
348+ ) = self ._get_runtime_config_from_model_deployment (
349349 aqua_model = aqua_model ,
350350 deployment_details = create_deployment_details ,
351351 container_config = container_config ,
@@ -364,12 +364,10 @@ def _create(
364364 cmd_var = cmd_var ,
365365 )
366366
367- def _get_container_details (
367+ def _get_runtime_config_from_model_deployment (
368368 self ,
369369 aqua_model : DataScienceModel ,
370- deployment_details : Union [
371- CreateModelDeploymentDetails , UpdateModelDeploymentDetails
372- ],
370+ deployment_details : Union [ModelDeploymentCreateSpec , ModelDeploymentUpdateSpec ],
373371 container_config : Dict ,
374372 ):
375373 """Gets required or optional configurations for building container runtime of model deployment.
@@ -378,8 +376,8 @@ def _get_container_details(
378376 ----------
379377 aqua_model: DataScienceModel
380378 An instance of Aqua data science model.
381- deployment_details: Union[CreateModelDeploymentDetails, UpdateModelDeploymentDetails ]
382- An instance of either CreateModelDeploymentDetails or UpdateModelDeploymentDetails containing all required and optional
379+ deployment_details: Union[ModelDeploymentCreateSpec, ModelDeploymentUpdateSpec ]
380+ An instance of either ModelDeploymentCreateSpec or ModelDeploymentUpdateSpec containing all required and optional
383381 fields for creating or updating a model deployment via Aqua.
384382 container_config: Dict
385383 Container config dictionary.
@@ -608,7 +606,7 @@ def _create_multi(
608606 self ,
609607 aqua_model : DataScienceModel ,
610608 model_config_summary : ModelDeploymentConfigSummary ,
611- create_deployment_details : CreateModelDeploymentDetails ,
609+ create_deployment_details : ModelDeploymentCreateSpec ,
612610 container_config : AquaContainerConfig ,
613611 ) -> AquaDeployment :
614612 """Builds the environment variables required by multi deployment container and creates the deployment.
@@ -619,8 +617,8 @@ def _create_multi(
619617 Summary Model Deployment configuration for the group of models.
620618 aqua_model : DataScienceModel
621619 An instance of Aqua data science model.
622- create_deployment_details : CreateModelDeploymentDetails
623- An instance of CreateModelDeploymentDetails containing all required and optional
620+ create_deployment_details : ModelDeploymentCreateSpec
621+ An instance of ModelDeploymentCreateSpec containing all required and optional
624622 fields for creating a model deployment via Aqua.
625623 container_config: Dict
626624 Container config dictionary.
@@ -752,7 +750,7 @@ def _create_multi(
752750
753751 def _create_deployment (
754752 self ,
755- create_deployment_details : CreateModelDeploymentDetails ,
753+ create_deployment_details : ModelDeploymentCreateSpec ,
756754 aqua_model_id : str ,
757755 model_name : str ,
758756 model_type : str ,
@@ -767,8 +765,8 @@ def _create_deployment(
767765
768766 Parameters
769767 ----------
770- create_deployment_details : CreateModelDeploymentDetails
771- An instance of CreateModelDeploymentDetails containing all required and optional
768+ create_deployment_details : ModelDeploymentCreateSpec
769+ An instance of ModelDeploymentCreateSpec containing all required and optional
772770 fields for creating a model deployment via Aqua.
773771 aqua_model_id: str
774772 The id of the aqua model to be deployed.
@@ -963,16 +961,16 @@ def list(self, **kwargs) -> List["AquaDeployment"]:
963961 @telemetry (entry_point = "plugin=deployment&action=update" , name = "aqua" )
964962 def update (
965963 self ,
966- update_deployment_details : Optional [UpdateModelDeploymentDetails ] = None ,
964+ update_deployment_details : Optional [ModelDeploymentUpdateSpec ] = None ,
967965 ** kwargs ,
968966 ) -> "AquaDeployment" :
969967 """
970968 Updates an Aqua model deployment.\n
971969 For detailed information about CLI flags see: https://github.com/oracle-samples/oci-data-science-ai-samples/blob/main/ai-quick-actions/cli-tips.md#update-model-deployment
972970
973971 Args:
974- update_deployment_details : UpdateModelDeploymentDetails , optional
975- An instance of UpdateModelDeploymentDetails containing all required and optional
972+ update_deployment_details : ModelDeploymentUpdateSpec , optional
973+ An instance of ModelDeploymentUpdateSpec containing all required and optional
976974 fields for updating a model deployment via Aqua.
977975 kwargs:
978976 deployment_id (str): The OCID of model deployment to be update.
@@ -1008,7 +1006,7 @@ def update(
10081006 # Build update deployment details from kwargs if not explicitly provided.
10091007 if update_deployment_details is None :
10101008 try :
1011- update_deployment_details = UpdateModelDeploymentDetails (** kwargs )
1009+ update_deployment_details = ModelDeploymentUpdateSpec (** kwargs )
10121010 except ValidationError as ex :
10131011 custom_errors = build_pydantic_error_message (ex )
10141012 raise AquaValueError (
@@ -1096,7 +1094,7 @@ def _update(
10961094 self ,
10971095 model : DataScienceModel ,
10981096 model_deployment : ModelDeployment ,
1099- update_deployment_details : UpdateModelDeploymentDetails ,
1097+ update_deployment_details : ModelDeploymentUpdateSpec ,
11001098 ):
11011099 """Builds the configurations required by single model deployment and updates the deployment.
11021100
@@ -1106,8 +1104,8 @@ def _update(
11061104 An instance of Aqua data science model.
11071105 model_deployment : ModelDeployment
11081106 An instance of Aqua model deployment.
1109- update_deployment_details : UpdateModelDeploymentDetails
1110- An instance of UpdateModelDeploymentDetails containing all required and optional
1107+ update_deployment_details : ModelDeploymentUpdateSpec
1108+ An instance of ModelDeploymentUpdateSpec containing all required and optional
11111109 fields for updating a model deployment via Aqua.
11121110 """
11131111 infrastructure = model_deployment .infrastructure
@@ -1174,7 +1172,7 @@ def _update(
11741172 env_var ,
11751173 tags ,
11761174 cmd_var ,
1177- ) = self ._get_container_details (
1175+ ) = self ._get_runtime_config_from_model_deployment (
11781176 aqua_model = model ,
11791177 deployment_details = update_deployment_details ,
11801178 container_config = self .get_container_config (),
0 commit comments