33
33
read_file ,
34
34
upload_folder ,
35
35
)
36
+ from ads .aqua .config .config import get_valid_tasks
36
37
from ads .aqua .constants import (
37
38
AQUA_MODEL_ARTIFACT_CONFIG ,
38
39
AQUA_MODEL_ARTIFACT_CONFIG_MODEL_NAME ,
@@ -735,7 +736,6 @@ def _create_model_catalog_entry(
735
736
model_name : str ,
736
737
inference_container : str ,
737
738
finetuning_container : str ,
738
- task : Optional [str ],
739
739
verified_model : DataScienceModel ,
740
740
validation_result : ModelValidationResult ,
741
741
compartment_id : Optional [str ],
@@ -768,7 +768,7 @@ def _create_model_catalog_entry(
768
768
}
769
769
)
770
770
tags .update ({Tags .BASE_MODEL_CUSTOM : "true" })
771
-
771
+ logger . info ( f"tags: { tags } " )
772
772
if validation_result and validation_result .model_formats :
773
773
tags .update (
774
774
{
@@ -781,7 +781,7 @@ def _create_model_catalog_entry(
781
781
782
782
# Remove `ready_to_import` tag that might get copied from service model.
783
783
tags .pop (Tags .READY_TO_IMPORT , None )
784
-
784
+ logger . info ( f"tags: { tags } " )
785
785
if verified_model :
786
786
# Verified model is a model in the service catalog that either has no artifacts but contains all the necessary metadata for deploying and fine tuning.
787
787
# If set, then we copy all the model metadata.
@@ -791,7 +791,6 @@ def _create_model_catalog_entry(
791
791
json_dict = verified_model .model_file_description
792
792
)
793
793
else :
794
- tags .update ({Tags .TASK : task })
795
794
metadata = ModelCustomMetadata ()
796
795
if not inference_container :
797
796
raise AquaRuntimeError (
@@ -864,6 +863,7 @@ def _create_model_catalog_entry(
864
863
category = "Other" ,
865
864
replace = True ,
866
865
)
866
+ logger .info (f"tags: { tags } " )
867
867
model = (
868
868
model .with_custom_metadata_list (metadata )
869
869
.with_compartment_id (compartment_id or COMPARTMENT_OCID )
@@ -1332,13 +1332,13 @@ def register(
1332
1332
else :
1333
1333
artifact_path = import_model_details .os_path .rstrip ("/" )
1334
1334
1335
+ logger .info (f"task: { import_model_details .task } " )
1335
1336
# Create Model catalog entry with pass by reference
1336
1337
ds_model = self ._create_model_catalog_entry (
1337
1338
os_path = artifact_path ,
1338
1339
model_name = model_name ,
1339
1340
inference_container = import_model_details .inference_container ,
1340
1341
finetuning_container = import_model_details .finetuning_container ,
1341
- task = import_model_details .task ,
1342
1342
verified_model = verified_model ,
1343
1343
validation_result = validation_result ,
1344
1344
compartment_id = import_model_details .compartment_id ,
0 commit comments