0

We are using both Vertex AI training jobs and Kubeflow pipelines in Google Clouds Vertex AI.

In training jobs we log parameters and metrics to Vertex AI Experiments through the python sdk.

Can Vertex AI Pipelines track metrics from the Kubeflow pipeline to Experiments? Or failing that is it possible to get the pipeline run id and log manually through the sdk using this id is the run id? Any other approaches for experiment tracking in Vertex AI Pipelines?

sniggatooth
  • 131
  • 3

2 Answers2

0

There are quite a few ways of starting a pipeline, if you use the following it is easy to get the job id (resource name):

import google.cloud.aiplatform as aip

job = aip.PipelineJob( display_name=f"{COMPONENT_NAME}-pipeline", template_path=jobspec_filename, enable_caching=False, # pipeline_root=pipeline_root_path, parameter_values={ 'project_id': 'p1' } )

job.run() print(job)

The above will print something like:

<google.cloud.aiplatform.pipeline_jobs.PipelineJob object at 0x7f18811b7c50> resource name: projects/[PROJECT_ID]/locations/us-central1/pipelineJobs/[pipeline execution id]

I've not tried but I think you can use the PipelineService to list or get previous pipeline executions. There are some methods like ListTrainingPipelinesRequest and ListTrainingPipelinesResponse may be useful

owennewo
  • 301
  • 2
  • 3
0

Can Vertex AI Pipelines track metrics from the Kubeflow pipeline to Experiments?

Yes, you can. See the notebook example linked in this doc: https://cloud.google.com/vertex-ai/docs/experiments/user-journey/uj-compare-pipeline-runs

chesu
  • 56
  • 1