File tree Expand file tree Collapse file tree 5 files changed +45
-27
lines changed Expand file tree Collapse file tree 5 files changed +45
-27
lines changed Original file line number Diff line number Diff line change @@ -668,23 +668,26 @@ def get_model_by_reference_paths(model_file_description: dict):
668
668
fine_tune_output_path = UNKNOWN
669
669
models = model_file_description ["models" ]
670
670
671
- for model in models :
672
- namespace , bucket_name , prefix = (
673
- model ["namespace" ],
674
- model ["bucketName" ],
675
- model ["prefix" ],
671
+ if not models :
672
+ raise AquaValueError (
673
+ f"Model path is not available in the model json artifact. "
674
+ f"Please check if the model created by reference has the correct artifact."
676
675
)
677
- bucket_uri = f"oci://{ bucket_name } @{ namespace } /{ prefix } " .rstrip ("/" )
678
- if bucket_name == AQUA_SERVICE_MODELS_BUCKET :
679
- base_model_path = bucket_uri
680
- else :
681
- fine_tune_output_path = bucket_uri
682
676
683
- if not base_model_path :
684
- raise AquaValueError (
685
- f"Base Model should come from the bucket { AQUA_SERVICE_MODELS_BUCKET } . "
686
- f"Other paths are not supported by Aqua."
677
+ if len (models ) > 0 :
678
+ # since the model_file_description json does not have a flag to identify the base model, we consider
679
+ # the first instance to be the base model.
680
+ base_model_artifact = models [0 ]
681
+ base_model_path = f"oci://{ base_model_artifact ['bucketName' ]} @{ base_model_artifact ['namespace' ]} /{ base_model_artifact ['prefix' ]} " .rstrip (
682
+ "/"
687
683
)
684
+ if len (models ) > 1 :
685
+ # second model is considered as fine-tuned model
686
+ ft_model_artifact = models [1 ]
687
+ fine_tune_output_path = f"oci://{ ft_model_artifact ['bucketName' ]} @{ ft_model_artifact ['namespace' ]} /{ ft_model_artifact ['prefix' ]} " .rstrip (
688
+ "/"
689
+ )
690
+
688
691
return base_model_path , fine_tune_output_path
689
692
690
693
Original file line number Diff line number Diff line change @@ -109,11 +109,13 @@ def create(
109
109
)
110
110
111
111
source = self .get_source (create_fine_tuning_details .ft_source_id )
112
- if source .compartment_id != ODSC_MODEL_COMPARTMENT_OCID :
113
- raise AquaValueError (
114
- f"Fine tuning is only supported for Aqua service models in { ODSC_MODEL_COMPARTMENT_OCID } . "
115
- "Use a valid Aqua service model id instead."
116
- )
112
+
113
+ # todo: revisit validation for fine tuned models
114
+ # if source.compartment_id != ODSC_MODEL_COMPARTMENT_OCID:
115
+ # raise AquaValueError(
116
+ # f"Fine tuning is only supported for Aqua service models in {ODSC_MODEL_COMPARTMENT_OCID}. "
117
+ # "Use a valid Aqua service model id instead."
118
+ # )
117
119
118
120
target_compartment = (
119
121
create_fine_tuning_details .compartment_id or COMPARTMENT_OCID
@@ -364,6 +366,7 @@ def create(
364
366
source_freeform_tags .pop (Tags .LICENSE , None )
365
367
source_freeform_tags .update ({Tags .READY_TO_FINE_TUNE : "false" })
366
368
source_freeform_tags .update ({Tags .AQUA_TAG : UNKNOWN })
369
+ source_freeform_tags .pop (Tags .BASE_MODEL_CUSTOM , None )
367
370
368
371
self .update_model (
369
372
model_id = ft_model .id ,
Original file line number Diff line number Diff line change @@ -648,15 +648,19 @@ def _create_model_catalog_entry(
648
648
copy_model_config (
649
649
artifact_path = artifact_path , os_path = os_path , auth = default_signer ()
650
650
)
651
-
652
651
except :
653
- # Add artifact from user bucket
654
- metadata .add (
655
- key = MODEL_BY_REFERENCE_OSS_PATH_KEY ,
656
- value = os_path ,
657
- description = "artifact location" ,
658
- category = "Other" ,
652
+ logger .debug (
653
+ f"Proceeding with model registration without copying model config files at { os_path } . "
654
+ f"Default configuration will be used for deployment and fine-tuning."
659
655
)
656
+ # Set artifact location to user bucket, and replace existing key if present.
657
+ metadata .add (
658
+ key = MODEL_BY_REFERENCE_OSS_PATH_KEY ,
659
+ value = os_path ,
660
+ description = "artifact location" ,
661
+ category = "Other" ,
662
+ replace = True ,
663
+ )
660
664
661
665
model = (
662
666
model .with_custom_metadata_list (metadata )
Original file line number Diff line number Diff line change 2
2
Release Notes
3
3
=============
4
4
5
+ 2.11.11
6
+ ------
7
+ Release date: June 11, 2024
8
+
9
+ * Fixed the bug that led to timeout when loading config files during jupyterlab load.
10
+ * Fixed bugs and introduced enhancements following our recent release.
11
+
12
+
5
13
2.11.10
6
14
------
7
15
Release date: June 5, 2024
Original file line number Diff line number Diff line change @@ -21,7 +21,7 @@ build-backend = "flit_core.buildapi"
21
21
22
22
# Required
23
23
name = " oracle_ads" # the install (PyPI) name; name for local build in [tool.flit.module] section below
24
- version = " 2.11.10 "
24
+ version = " 2.11.11 "
25
25
26
26
# Optional
27
27
description = " Oracle Accelerated Data Science SDK"
You can’t perform that action at this time.
0 commit comments