Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion ads/aqua/modeldeployment/deployment.py
Original file line number Diff line number Diff line change
Expand Up @@ -1211,7 +1211,10 @@ def _create_deployment(
progress_thread.start()

# we arbitrarily choose last 8 characters of OCID to identify MD in telemetry
telemetry_kwargs = {"ocid": get_ocid_substring(deployment_id, key_len=8)}
deployment_short_ocid = get_ocid_substring(deployment_id, key_len=8)

# Prepare telemetry kwargs
telemetry_kwargs = {"ocid": deployment_short_ocid}

if Tags.BASE_MODEL_CUSTOM in tags:
telemetry_kwargs["custom_base_model"] = True
Expand All @@ -1223,6 +1226,11 @@ def _create_deployment(
else:
telemetry_kwargs["deployment_type"] = DeploymentType.SINGLE

telemetry_kwargs["container"] = (
create_deployment_details.container_family
or create_deployment_details.container_image_uri
)

# tracks unique deployments that were created in the user compartment
self.telemetry.record_event_async(
category=f"aqua/{model_type}/deployment",
Expand All @@ -1236,6 +1244,7 @@ def _create_deployment(
action="shape",
detail=create_deployment_details.instance_shape,
value=model_name,
**{"ocid": deployment_short_ocid},
)

return AquaDeployment.from_oci_model_deployment(
Expand Down
Loading