Skip to content

Commit 01ae7aa

Browse files
Fix telemetry event record to better report output (#779)
2 parents 1c34cbb + de53f9e commit 01ae7aa

File tree

3 files changed

+20
-8
lines changed

3 files changed

+20
-8
lines changed

ads/aqua/deployment.py

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -403,17 +403,12 @@ def create(
403403
detail=model_name,
404404
**telemetry_kwargs,
405405
)
406-
# tracks the shape used for deploying the custom or service models
407-
self.telemetry.record_event_async(
408-
category=f"aqua/{model_type}/deployment/create",
409-
action="shape",
410-
detail=instance_shape,
411-
)
412406
# tracks the shape used for deploying the custom or service models by name
413407
self.telemetry.record_event_async(
414-
category=f"aqua/{model_type}/{model_name}/deployment/create",
408+
category=f"aqua/{model_type}/deployment/create",
415409
action="shape",
416410
detail=instance_shape,
411+
value=model_name,
417412
)
418413

419414
return AquaDeployment.from_oci_model_deployment(

ads/aqua/evaluation.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -683,6 +683,14 @@ def create(
683683
),
684684
)
685685

686+
# tracks shapes used in evaluation that were created for the given evaluation source
687+
self.telemetry.record_event_async(
688+
category="aqua/evaluation/create",
689+
action="shape",
690+
detail=create_aqua_evaluation_details.shape_name,
691+
value=self._get_service_model_name(evaluation_source),
692+
)
693+
686694
# tracks unique evaluation that were created for the given evaluation source
687695
self.telemetry.record_event_async(
688696
category="aqua/evaluation",

ads/aqua/finetune.py

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -462,8 +462,9 @@ def create(
462462
telemetry_kwargs = (
463463
{"ocid": ft_job.id[-6:]} if ft_job and len(ft_job.id) > 6 else {}
464464
)
465+
# track shapes that were used for fine-tune creation
465466
self.telemetry.record_event_async(
466-
category=f"aqua/service/{source.display_name}/finetune/create/shape/",
467+
category=f"aqua/service/finetune/create/shape/",
467468
action=f"{create_fine_tuning_details.shape_name}x{create_fine_tuning_details.replica}",
468469
**telemetry_kwargs,
469470
)
@@ -473,6 +474,14 @@ def create(
473474
category="aqua/service/finetune",
474475
action="create",
475476
detail=source.display_name,
477+
**telemetry_kwargs,
478+
)
479+
# track combination of model and shape used for fine-tune creation
480+
self.telemetry.record_event_async(
481+
category="aqua/service/finetune/create",
482+
action="shape",
483+
detail=f"{create_fine_tuning_details.shape_name}x{create_fine_tuning_details.replica}",
484+
value=source.display_name,
476485
)
477486

478487
return AquaFineTuningSummary(

0 commit comments

Comments
 (0)