如何从组件内部获取运行ID? [英] How to get the id of the run from within a component?

查看:90
本文介绍了如何从组件内部获取运行ID?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在对Kubeflow管道进行一些试验,并且我有兴趣检索要保存的运行ID以及有关管道执行的一些元数据.我可以通过ContainerOp之类的组件来做到这一点吗?

I'm doing some experimentation with Kubeflow Pipelines and I'm interested in retrieving the run id to save along with some metadata about the pipeline execution. Is there any way I can do so from a component like a ContainerOp?

推荐答案

我尝试使用

I tried to do this using the Python's DSL but seems that isn't possible right now.

我发现的唯一选择是使用他们在

The only option that I found is to use the method that they used in this sample code. You basically declare a string containing {{workflow.uid}}. It will be replaced with the actual value during execution time.

您也可以执行此操作以获取广告连播名称,该名称为{{pod.name}}.

You can also do this in order to get the pod name, it would be {{pod.name}}.

这篇关于如何从组件内部获取运行ID?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆