如何跟踪来自 Vertex AI 管道的参数和指标

Posted

技术标签:

【中文标题】如何跟踪来自 Vertex AI 管道的参数和指标【英文标题】:How to track parameter and metrics from Vertex AI pipelines 【发布时间】:2021-11-27 06:46:28 【问题描述】:

我们在 Google Clouds Vertex AI 中同时使用 Vertex AI 训练作业和 Kubeflow 管道。

在训练作业中,我们通过 python sdk 将参数和指标记录到 Vertex AI Experiments。

Vertex AI Pipelines 能否跟踪从 Kubeflow 管道到 Experiments 的指标?或者如果失败了,是否有可能通过 sdk 获取管道运行 ID 并使用此 ID 手动记录运行 ID? Vertex AI Pipelines 中的任何其他实验跟踪方法?

【问题讨论】:

【参考方案1】:

启动管道的方法有很多种,如果使用以下方法很容易获得作业ID(资源名称):

将 google.cloud.aiplatform 导入为 aip

工作 = aip.PipelineJob( display_name=f"COMPONENT_NAME-管道", template_path=jobspec_filename, enable_caching=假, # pipeline_root=pipeline_root_path, 参数值= 'project_id':'p1' )

job.run() 打印(作业)

上面将打印如下内容:

资源名称:projects/[PROJECT_ID]/locations/us-central1/pipelineJobs/[pipeline execution id]

我没有尝试过,但我认为您可以使用 PipelineService 列出或获取以前的管道执行。有一些方法,例如 ListTrainingPipelinesRequest 和 ListTrainingPipelinesResponse 可能有用

【讨论】:

以上是关于如何跟踪来自 Vertex AI 管道的参数和指标的主要内容,如果未能解决你的问题,请参考以下文章

在 Vertex AI 上使用 Tesla A100 GPU 和 Kubeflow Pipelines

在 GCP Vertex AI 中,为啥没有实现 Delete Training Pipeline REST 端点?

如何查看和解释 Vertex AI 日志

Vertex AI - ModelDeployOp(...) 上没有名为“google_cloud_pipeline_components.remote”的模块

如何在 Vertex AI 中构建容器日志?

如何在 Vertex AI 表格预测中分配两个或多个时间序列标识符列