@@ -141,7 +141,7 @@ class AquaModelApp(AquaApp):
141141 @telemetry (entry_point = "plugin=model&action=create" , name = "aqua" )
142142 def create (
143143 self ,
144- model_id : Union [str , AquaMultiModelRef ],
144+ model : Union [str , AquaMultiModelRef ],
145145 project_id : Optional [str ] = None ,
146146 compartment_id : Optional [str ] = None ,
147147 freeform_tags : Optional [Dict ] = None ,
@@ -153,7 +153,7 @@ def create(
153153
154154 Parameters
155155 ----------
156- model_id : Union[str, AquaMultiModelRef]
156+ model : Union[str, AquaMultiModelRef]
157157 The model ID as a string or a AquaMultiModelRef instance to be deployed.
158158 project_id : Optional[str]
159159 The project ID for the custom model.
@@ -171,11 +171,11 @@ def create(
171171 The instance of DataScienceModel or DataScienceModelGroup.
172172 """
173173 fine_tune_weights = []
174- if isinstance (model_id , AquaMultiModelRef ):
175- fine_tune_weights = model_id .fine_tune_weights
176- model_id = model_id .model_id
174+ if isinstance (model , AquaMultiModelRef ):
175+ fine_tune_weights = model .fine_tune_weights
176+ model = model .model_id
177177
178- service_model = DataScienceModel .from_id (model_id )
178+ service_model = DataScienceModel .from_id (model )
179179 target_project = project_id or PROJECT_OCID
180180 target_compartment = compartment_id or COMPARTMENT_OCID
181181
@@ -192,7 +192,7 @@ def create(
192192 custom_model = None
193193 if fine_tune_weights :
194194 custom_model = self ._create_model_group (
195- model_id = model_id ,
195+ model_id = model ,
196196 compartment_id = target_compartment ,
197197 project_id = target_project ,
198198 freeform_tags = combined_freeform_tags ,
@@ -202,18 +202,16 @@ def create(
202202 )
203203
204204 logger .info (
205- f"Aqua Model Group { custom_model .id } created with the service model { model_id } ."
205+ f"Aqua Model Group { custom_model .id } created with the service model { model } ."
206206 )
207207 else :
208208 # Skip model copying if it is registered model or fine-tuned model
209209 if (
210- service_model .freeform_tags .get (Tags .BASE_MODEL_CUSTOM , None )
211- is not None
212- or service_model .freeform_tags .get (Tags .AQUA_FINE_TUNED_MODEL_TAG )
213- is not None
210+ Tags .BASE_MODEL_CUSTOM in service_model .freeform_tags
211+ or Tags .AQUA_FINE_TUNED_MODEL_TAG in service_model .freeform_tags
214212 ):
215213 logger .info (
216- f"Aqua Model { model_id } already exists in the user's compartment."
214+ f"Aqua Model { model } already exists in the user's compartment."
217215 "Skipped copying."
218216 )
219217 return service_model
@@ -227,7 +225,7 @@ def create(
227225 ** kwargs ,
228226 )
229227 logger .info (
230- f"Aqua Model { custom_model .id } created with the service model { model_id } ."
228+ f"Aqua Model { custom_model .id } created with the service model { model } ."
231229 )
232230
233231 # Track unique models that were created in the user's compartment
0 commit comments