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):
668668 fine_tune_output_path = UNKNOWN
669669 models = model_file_description ["models" ]
670670
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."
676675 )
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
682676
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+ "/"
687683 )
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+
688691 return base_model_path , fine_tune_output_path
689692
690693
Original file line number Diff line number Diff line change @@ -109,11 +109,13 @@ def create(
109109 )
110110
111111 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+ # )
117119
118120 target_compartment = (
119121 create_fine_tuning_details .compartment_id or COMPARTMENT_OCID
@@ -364,6 +366,7 @@ def create(
364366 source_freeform_tags .pop (Tags .LICENSE , None )
365367 source_freeform_tags .update ({Tags .READY_TO_FINE_TUNE : "false" })
366368 source_freeform_tags .update ({Tags .AQUA_TAG : UNKNOWN })
369+ source_freeform_tags .pop (Tags .BASE_MODEL_CUSTOM , None )
367370
368371 self .update_model (
369372 model_id = ft_model .id ,
Original file line number Diff line number Diff line change @@ -648,15 +648,19 @@ def _create_model_catalog_entry(
648648 copy_model_config (
649649 artifact_path = artifact_path , os_path = os_path , auth = default_signer ()
650650 )
651-
652651 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."
659655 )
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+ )
660664
661665 model = (
662666 model .with_custom_metadata_list (metadata )
Original file line number Diff line number Diff line change 22Release Notes
33=============
44
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+
5132.11.10
614------
715Release date: June 5, 2024
Original file line number Diff line number Diff line change @@ -21,7 +21,7 @@ build-backend = "flit_core.buildapi"
2121
2222# Required
2323name = " 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 "
2525
2626# Optional
2727description = " Oracle Accelerated Data Science SDK"
You can’t perform that action at this time.
0 commit comments