Skip to content

Commit fc757f6

Browse files
committed
PR review comments
1 parent 3901004 commit fc757f6

File tree

1 file changed

+25
-2
lines changed

1 file changed

+25
-2
lines changed

ads/aqua/modeldeployment/deployment.py

Lines changed: 25 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@
4848
from ads.aqua.data import AquaResourceIdentifier
4949
from ads.aqua.finetuning.finetuning import FineTuneCustomMetadata
5050
from ads.aqua.model import AquaModelApp
51-
from ads.aqua.model.constants import AquaModelMetadataKeys, ModelCustomMetadataFields
51+
from ads.aqua.model.constants import AquaModelMetadataKeys, ModelCustomMetadataFields, ModelType
5252
from ads.aqua.modeldeployment.entities import (
5353
AquaDeployment,
5454
AquaDeploymentConfig,
@@ -803,7 +803,10 @@ def _create_deployment(
803803
)
804804

805805
# we arbitrarily choose last 8 characters of OCID to identify MD in telemetry
806-
telemetry_kwargs = {"ocid": get_ocid_substring(deployment_id, key_len=8), "custom_base_model": True}
806+
telemetry_kwargs = {"ocid": get_ocid_substring(deployment_id, key_len=8)}
807+
808+
if Tags.BASE_MODEL_CUSTOM in tags:
809+
telemetry_kwargs[ "custom_base_model"] = True
807810

808811
# tracks unique deployments that were created in the user compartment
809812
self.telemetry.record_event_async(
@@ -1324,3 +1327,23 @@ def list_shapes(self, **kwargs) -> List[ComputeShapeSummary]:
13241327
)
13251328
for oci_shape in oci_shapes
13261329
]
1330+
1331+
def get_deployment_status(self,model_deployment_id: str, work_request_id : str) :
1332+
# category= "aqua/{model_type}/deployment/status", action= "FAILED/SUCCEEDED", detail="Error message from Work request", value= {"ocid": md_ocid[:8]}
1333+
# # tracks unique evaluation that were created for the given evaluation source
1334+
# self.telemetry.record_event_async(
1335+
# category="aqua/evaluation",
1336+
# action="create",
1337+
# detail=self._get_service_model_name(evaluation_source),
1338+
# )
1339+
1340+
1341+
return
1342+
1343+
def get_deployment_status_async(self,model_deployment_id: str, work_request_id : str) :
1344+
# tracks unique evaluation that were created for the given evaluation source
1345+
self.telemetry.record_event_async(
1346+
category="aqua/evaluation",
1347+
action="create",
1348+
detail=self._get_service_model_name(evaluation_source),
1349+
)

0 commit comments

Comments
 (0)