Skip to content

Commit 17c59c4

Browse files
yinghsienwucopybara-github
authored andcommitted
feat: view model evaluations when AustoSxS pipeline completes
PiperOrigin-RevId: 642441033
1 parent 3481f40 commit 17c59c4

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

google/cloud/aiplatform/pipeline_jobs.py

+21
Original file line numberDiff line numberDiff line change
@@ -373,6 +373,27 @@ def _run(
373373

374374
self._block_until_complete()
375375

376+
# AutoSxS view model evaluations
377+
for details in self.task_details:
378+
if details.task_name == "model-evaluation-text-generation-pairwise":
379+
model_a_eval = details.execution.metadata[
380+
"output:model_a_evaluation_path"
381+
]
382+
model_b_eval = details.execution.metadata[
383+
"output:model_b_evaluation_path"
384+
]
385+
if model_a_eval:
386+
_LOGGER.info("Model A")
387+
utils._ipython_utils.display_model_evaluation_button(
388+
aiplatform.ModelEvaluation(model_a_eval),
389+
)
390+
if model_b_eval:
391+
_LOGGER.info("Model B")
392+
utils._ipython_utils.display_model_evaluation_button(
393+
aiplatform.ModelEvaluation(model_b_eval),
394+
)
395+
break
396+
376397
def submit(
377398
self,
378399
service_account: Optional[str] = None,

0 commit comments

Comments
 (0)