【问题标题】:How to define component/step using training operators such as TFJob in kubeflow pipeline如何在 kubeflow 管道中使用 TFJob 等训练算子定义组件/步骤
【发布时间】:2022-06-14 22:41:25
【问题描述】:

我知道有一种方法可以通过 kubectl 使用 tfjob 运算符,例如此处的示例 (https://www.kubeflow.org/docs/components/training/tftraining/):

kubectl create -f https://raw.githubusercontent.com/kubeflow/training-operator/master/examples/tensorflow/simple.yaml

但我不知道如何合并到 kubeflow 管道中。一个普通的组件/作业是通过 @component 装饰定义的,或者 ContainerOp 是一种在 Pod 中运行的 Kubernetes Job 类型,但我不知道如何定义一个组件TFJob等特训算子,让我的代码运行为

apiVersion: "kubeflow.org/v1"
kind: TFJob

而不是:

apiVersion: "kubeflow.org/v1"
kind: Job

在 Kubernetes 中。

P.S.:这里有一个例子:https://github.com/kubeflow/pipelines/blob/master/components/kubeflow/launcher/sample.py 但看不到任何地方指定 TFJob

【问题讨论】:

    标签: kubeflow kubeflow-pipelines


    【解决方案1】:

    您引用的示例利用了一些实际创建 TFJob (look at the folder of your example) 的代码:

    您提出的一般性问题仍以current discussions为准。使用tfjob_launcher_op 似乎是目前推荐的方式。相反,有些人还原生使用ResourceOps 来模拟您的kubectl create 调用。

    【讨论】:

      猜你喜欢
      • 2021-06-14
      • 2022-08-23
      • 2020-11-18
      • 2020-01-24
      • 1970-01-01
      • 2020-10-01
      • 2020-10-27
      • 2019-10-21
      • 2021-06-13
      相关资源
      最近更新 更多