From 710f33d87e242a283e8fbe5327ba9fa781d0d8fc Mon Sep 17 00:00:00 2001 From: A Vertex SDK engineer Date: Tue, 14 May 2024 17:18:04 -0700 Subject: [PATCH] fix: Fix feature attribution drift visualization for model monitoring SDK PiperOrigin-RevId: 633754094 --- vertexai/resources/preview/ml_monitoring/model_monitors.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vertexai/resources/preview/ml_monitoring/model_monitors.py b/vertexai/resources/preview/ml_monitoring/model_monitors.py index 6e26858f08..c53a438e37 100644 --- a/vertexai/resources/preview/ml_monitoring/model_monitors.py +++ b/vertexai/resources/preview/ml_monitoring/model_monitors.py @@ -121,7 +121,7 @@ def _visualize_feature_attribution(feature_attribution_output: str) -> None: import tensorflow as tf with tf.io.gfile.GFile(feature_attribution_output, "r") as f: - return json.loads(f.read()) + print(json.dumps(json.loads(f.read()), indent=4)) def _feature_drift_stats_output_path(output_directory: str, job_id: str) -> (str, str):