diff --git a/google/cloud/aiplatform/pipeline_jobs.py b/google/cloud/aiplatform/pipeline_jobs.py index 2b672d2663..6184f4b8ec 100644 --- a/google/cloud/aiplatform/pipeline_jobs.py +++ b/google/cloud/aiplatform/pipeline_jobs.py @@ -373,6 +373,27 @@ def _run( self._block_until_complete() + # AutoSxS view model evaluations + for details in self.task_details: + if details.task_name == "model-evaluation-text-generation-pairwise": + model_a_eval = details.execution.metadata[ + "output:model_a_evaluation_path" + ] + model_b_eval = details.execution.metadata[ + "output:model_b_evaluation_path" + ] + if model_a_eval: + _LOGGER.info("Model A") + utils._ipython_utils.display_model_evaluation_button( + aiplatform.ModelEvaluation(model_a_eval), + ) + if model_b_eval: + _LOGGER.info("Model B") + utils._ipython_utils.display_model_evaluation_button( + aiplatform.ModelEvaluation(model_b_eval), + ) + break + def submit( self, service_account: Optional[str] = None,