From 3588526deb5e5c5cf7467d8ef104cff3dafaa09f Mon Sep 17 00:00:00 2001 From: Jaycee Li <102714969+jaycee-li@users.noreply.github.com> Date: Wed, 19 Oct 2022 18:21:30 -0700 Subject: [PATCH] fix: log_classification_metrics (#1742) --- google/cloud/aiplatform/metadata/experiment_run_resource.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/google/cloud/aiplatform/metadata/experiment_run_resource.py b/google/cloud/aiplatform/metadata/experiment_run_resource.py index ef4a08a504..87e0fb3eb5 100644 --- a/google/cloud/aiplatform/metadata/experiment_run_resource.py +++ b/google/cloud/aiplatform/metadata/experiment_run_resource.py @@ -1045,6 +1045,8 @@ def log_classification_metrics( if (fpr or tpr or threshold) and not (fpr and tpr and threshold): raise ValueError("fpr, tpr, and thresholds must be set together.") + confusion_matrix = confidence_metrics = None + if labels and matrix: if len(matrix) != len(labels): raise ValueError(