Skip to content

Commit 254ff51

Browse files
committed
Update category for telemetry model and shape used in deployment and finetune.
1 parent c5b657a commit 254ff51

File tree

2 files changed

+8
-16
lines changed

2 files changed

+8
-16
lines changed

ads/aqua/deployment.py

Lines changed: 4 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -396,34 +396,24 @@ def create(
396396
self.telemetry.record_event_async(
397397
category="aqua/custom/deployment", action="create", detail=model_name
398398
)
399-
# tracks the shape used for deploying the custom models
400-
self.telemetry.record_event_async(
401-
category="aqua/custom/deployment/create",
402-
action="shape",
403-
detail=instance_shape,
404-
)
405399
# tracks the shape used for deploying the custom models by name
406400
self.telemetry.record_event_async(
407-
category=f"aqua/custom/{model_name}/deployment/create",
401+
category=f"aqua/custom/deployment/create",
408402
action="shape",
409403
detail=instance_shape,
404+
value=model_name
410405
)
411406
else:
412407
# tracks unique deployments that were created in the user compartment
413408
self.telemetry.record_event_async(
414409
category="aqua/service/deployment", action="create", detail=model_name
415410
)
416-
# tracks the shape used for deploying the service models
417-
self.telemetry.record_event_async(
418-
category="aqua/service/deployment/create",
419-
action="shape",
420-
detail=instance_shape,
421-
)
422411
# tracks the shape used for deploying the service models by name
423412
self.telemetry.record_event_async(
424-
category=f"aqua/service/{model_name}/deployment/create",
413+
category="aqua/service/deployment/create",
425414
action="shape",
426415
detail=instance_shape,
416+
value=model_name
427417
)
428418

429419
return AquaDeployment.from_oci_model_deployment(

ads/aqua/finetune.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -461,8 +461,10 @@ def create(
461461
{"ocid": ft_job.id[-6:]} if ft_job and len(ft_job.id) > 6 else {}
462462
)
463463
self.telemetry.record_event_async(
464-
category=f"aqua/service/{source.display_name}/finetune/create/shape/",
465-
action=f"{create_fine_tuning_details.shape_name}x{create_fine_tuning_details.replica}",
464+
category="aqua/service/finetune/create",
465+
action="shape",
466+
detail=f"{create_fine_tuning_details.shape_name}x{create_fine_tuning_details.replica}",
467+
value=source.display_name,
466468
**telemetry_kwargs,
467469
)
468470
# tracks unique fine-tuned models that were created in the user compartment

0 commit comments

Comments
 (0)