1515from ads .aqua import ODSC_MODEL_COMPARTMENT_OCID , logger
1616from ads .aqua .app import AquaApp
1717from ads .aqua .common .enums import (
18+ CustomInferenceContainerTypeFamily ,
1819 FineTuningContainerTypeFamily ,
1920 InferenceContainerTypeFamily ,
20- Tags , CustomInferenceContainerTypeFamily ,
21+ Tags ,
2122)
2223from ads .aqua .common .errors import AquaRuntimeError , AquaValueError
2324from ads .aqua .common .utils import (
@@ -405,18 +406,19 @@ def edit_registered_model(
405406 if ds_model .freeform_tags .get (Tags .BASE_MODEL_CUSTOM , None ):
406407 if ds_model .freeform_tags .get (Tags .AQUA_SERVICE_MODEL_TAG , None ):
407408 raise AquaRuntimeError (
408- f "Only registered unverified models can be edited."
409+ "Only registered unverified models can be edited."
409410 )
410411 else :
411412 custom_metadata_list = ds_model .custom_metadata_list
412413 freeform_tags = ds_model .freeform_tags
413414 if inference_container :
414415 if (
415- inference_container in CustomInferenceContainerTypeFamily .values ()
416+ inference_container
417+ in CustomInferenceContainerTypeFamily .values ()
416418 and inference_container_uri is None
417419 ):
418420 raise AquaRuntimeError (
419- f "Inference container URI must be provided."
421+ "Inference container URI must be provided."
420422 )
421423 else :
422424 custom_metadata_list .add (
@@ -428,7 +430,8 @@ def edit_registered_model(
428430 )
429431 if inference_container_uri :
430432 if (
431- inference_container in CustomInferenceContainerTypeFamily .values ()
433+ inference_container
434+ in CustomInferenceContainerTypeFamily .values ()
432435 or inference_container is None
433436 ):
434437 custom_metadata_list .add (
@@ -477,9 +480,7 @@ def edit_registered_model(
477480 )
478481 AquaApp ().update_model (id , update_model_details )
479482 else :
480- raise AquaRuntimeError (
481- f"Only registered unverified models can be edited."
482- )
483+ raise AquaRuntimeError ("Only registered unverified models can be edited." )
483484
484485 def _fetch_metric_from_metadata (
485486 self ,
0 commit comments