|
48 | 48 | from ads.aqua.data import AquaResourceIdentifier
|
49 | 49 | from ads.aqua.finetuning.finetuning import FineTuneCustomMetadata
|
50 | 50 | 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 |
52 | 52 | from ads.aqua.modeldeployment.entities import (
|
53 | 53 | AquaDeployment,
|
54 | 54 | AquaDeploymentConfig,
|
@@ -803,7 +803,10 @@ def _create_deployment(
|
803 | 803 | )
|
804 | 804 |
|
805 | 805 | # 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 |
807 | 810 |
|
808 | 811 | # tracks unique deployments that were created in the user compartment
|
809 | 812 | self.telemetry.record_event_async(
|
@@ -1324,3 +1327,23 @@ def list_shapes(self, **kwargs) -> List[ComputeShapeSummary]:
|
1324 | 1327 | )
|
1325 | 1328 | for oci_shape in oci_shapes
|
1326 | 1329 | ]
|
| 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