15
15
from ads .aqua import ODSC_MODEL_COMPARTMENT_OCID , logger
16
16
from ads .aqua .app import AquaApp
17
17
from ads .aqua .common .enums import (
18
+ CustomInferenceContainerTypeFamily ,
18
19
FineTuningContainerTypeFamily ,
19
20
InferenceContainerTypeFamily ,
20
- Tags , CustomInferenceContainerTypeFamily ,
21
+ Tags ,
21
22
)
22
23
from ads .aqua .common .errors import AquaRuntimeError , AquaValueError
23
24
from ads .aqua .common .utils import (
@@ -405,18 +406,19 @@ def edit_registered_model(
405
406
if ds_model .freeform_tags .get (Tags .BASE_MODEL_CUSTOM , None ):
406
407
if ds_model .freeform_tags .get (Tags .AQUA_SERVICE_MODEL_TAG , None ):
407
408
raise AquaRuntimeError (
408
- f "Only registered unverified models can be edited."
409
+ "Only registered unverified models can be edited."
409
410
)
410
411
else :
411
412
custom_metadata_list = ds_model .custom_metadata_list
412
413
freeform_tags = ds_model .freeform_tags
413
414
if inference_container :
414
415
if (
415
- inference_container in CustomInferenceContainerTypeFamily .values ()
416
+ inference_container
417
+ in CustomInferenceContainerTypeFamily .values ()
416
418
and inference_container_uri is None
417
419
):
418
420
raise AquaRuntimeError (
419
- f "Inference container URI must be provided."
421
+ "Inference container URI must be provided."
420
422
)
421
423
else :
422
424
custom_metadata_list .add (
@@ -428,7 +430,8 @@ def edit_registered_model(
428
430
)
429
431
if inference_container_uri :
430
432
if (
431
- inference_container in CustomInferenceContainerTypeFamily .values ()
433
+ inference_container
434
+ in CustomInferenceContainerTypeFamily .values ()
432
435
or inference_container is None
433
436
):
434
437
custom_metadata_list .add (
@@ -477,9 +480,7 @@ def edit_registered_model(
477
480
)
478
481
AquaApp ().update_model (id , update_model_details )
479
482
else :
480
- raise AquaRuntimeError (
481
- f"Only registered unverified models can be edited."
482
- )
483
+ raise AquaRuntimeError ("Only registered unverified models can be edited." )
483
484
484
485
def _fetch_metric_from_metadata (
485
486
self ,
0 commit comments