@@ -561,6 +561,8 @@ def _create(
561561 AQUA_MODEL_TYPE_CUSTOM if is_fine_tuned_model else AQUA_MODEL_TYPE_SERVICE
562562 )
563563
564+ is_custom_base_model = Tags .BASE_MODEL_CUSTOM in aqua_model .freeform_tags
565+
564566 return self ._create_deployment (
565567 create_deployment_details = create_deployment_details ,
566568 aqua_model_id = aqua_model .id ,
@@ -572,6 +574,7 @@ def _create(
572574 env_var = env_var ,
573575 tags = tags ,
574576 cmd_var = cmd_var ,
577+ is_custom_base_model = is_custom_base_model ,
575578 )
576579
577580 def _create_multi (
@@ -648,6 +651,7 @@ def _create_multi(
648651 }
649652
650653 model_name = f"{ MODEL_NAME_DELIMITER } " .join (model_name_list )
654+ is_custom_base_model = Tags .BASE_MODEL_CUSTOM in aqua_model .freeform_tags
651655
652656 aqua_deployment = self ._create_deployment (
653657 create_deployment_details = create_deployment_details ,
@@ -659,6 +663,7 @@ def _create_multi(
659663 health_check_port = health_check_port ,
660664 env_var = env_var ,
661665 tags = tags ,
666+ is_custom_base_model = is_custom_base_model ,
662667 )
663668 aqua_deployment .models = create_deployment_details .models
664669 return aqua_deployment
@@ -674,6 +679,7 @@ def _create_deployment(
674679 health_check_port : str ,
675680 env_var : dict ,
676681 tags : dict ,
682+ is_custom_base_model : bool = False ,
677683 cmd_var : Optional [dict ] = None ,
678684 ):
679685 """Creates data science model deployment.
@@ -699,6 +705,8 @@ def _create_deployment(
699705 The environment variables input for the deployment.
700706 tags: dict
701707 The tags input for the deployment.
708+ is_custom_base_model: bool, optional
709+ The flag set true for custom model.
702710 cmd_var: dict, optional
703711 The cmd arguments input for the deployment.
704712
@@ -786,8 +794,8 @@ def _create_deployment(
786794 # we arbitrarily choose last 8 characters of OCID to identify MD in telemetry
787795 telemetry_kwargs = {"ocid" : get_ocid_substring (deployment_id , key_len = 8 )}
788796
789- if Tags . BASE_MODEL_CUSTOM in tags :
790- telemetry_kwargs ["custom_base_model" ] = True
797+ if is_custom_base_model :
798+ telemetry_kwargs ["custom_base_model" ] = " True"
791799
792800 # tracks unique deployments that were created in the user compartment
793801 self .telemetry .record_event_async (
0 commit comments