3333 read_file ,
3434 upload_folder ,
3535)
36+ from ads .aqua .config .config import get_valid_tasks
3637from ads .aqua .constants import (
3738 AQUA_MODEL_ARTIFACT_CONFIG ,
3839 AQUA_MODEL_ARTIFACT_CONFIG_MODEL_NAME ,
@@ -735,7 +736,6 @@ def _create_model_catalog_entry(
735736 model_name : str ,
736737 inference_container : str ,
737738 finetuning_container : str ,
738- task : Optional [str ],
739739 verified_model : DataScienceModel ,
740740 validation_result : ModelValidationResult ,
741741 compartment_id : Optional [str ],
@@ -768,7 +768,7 @@ def _create_model_catalog_entry(
768768 }
769769 )
770770 tags .update ({Tags .BASE_MODEL_CUSTOM : "true" })
771-
771+ logger . info ( f"tags: { tags } " )
772772 if validation_result and validation_result .model_formats :
773773 tags .update (
774774 {
@@ -781,7 +781,7 @@ def _create_model_catalog_entry(
781781
782782 # Remove `ready_to_import` tag that might get copied from service model.
783783 tags .pop (Tags .READY_TO_IMPORT , None )
784-
784+ logger . info ( f"tags: { tags } " )
785785 if verified_model :
786786 # 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.
787787 # If set, then we copy all the model metadata.
@@ -791,7 +791,6 @@ def _create_model_catalog_entry(
791791 json_dict = verified_model .model_file_description
792792 )
793793 else :
794- tags .update ({Tags .TASK : task })
795794 metadata = ModelCustomMetadata ()
796795 if not inference_container :
797796 raise AquaRuntimeError (
@@ -864,6 +863,7 @@ def _create_model_catalog_entry(
864863 category = "Other" ,
865864 replace = True ,
866865 )
866+ logger .info (f"tags: { tags } " )
867867 model = (
868868 model .with_custom_metadata_list (metadata )
869869 .with_compartment_id (compartment_id or COMPARTMENT_OCID )
@@ -1332,13 +1332,13 @@ def register(
13321332 else :
13331333 artifact_path = import_model_details .os_path .rstrip ("/" )
13341334
1335+ logger .info (f"task: { import_model_details .task } " )
13351336 # Create Model catalog entry with pass by reference
13361337 ds_model = self ._create_model_catalog_entry (
13371338 os_path = artifact_path ,
13381339 model_name = model_name ,
13391340 inference_container = import_model_details .inference_container ,
13401341 finetuning_container = import_model_details .finetuning_container ,
1341- task = import_model_details .task ,
13421342 verified_model = verified_model ,
13431343 validation_result = validation_result ,
13441344 compartment_id = import_model_details .compartment_id ,
0 commit comments