【问题标题】:How to pass arguments when creating kubeflow pipeline yaml file?创建 kubeflow 管道 yaml 文件时如何传递参数?
【发布时间】:2022-10-16 08:29:29
【问题描述】:

环境

  • minikube 最新 (kubernetes 1.21.14)
  • 自定义 3.2.0
  • kubectl 1.21.14
  • kubeflow/manifests v1.6-branch
  • KFP 版本 1.8.13

我想创建 kubeflow 管道文件以在 GKE 上运行管道。
我根据创建管道 Getting started building a pipeline
我无法通过以下方法获取 kubeflow 管道 yaml 文件。

kfp.compiler.Compiler().compile(
    pipeline_func=my_pipeline,
    package_path='pipeline.yaml',
    pipeline_parameters={'url': 'https://storage.googleapis.com/ml-pipeline-playground/iris-csv-files.tar.gz'})

我得到了TypeError: compile() got an unexpected keyword argument 'pipeline_parameters'
this implementation,我应该能够使用pipeline_parameters 参数来表示kfp.compiler.Compiler().compile

参考

【问题讨论】:

    标签: google-kubernetes-engine minikube kubeflow


    【解决方案1】:

    如果要为管道传递默认管道参数。您可以直接在管道的函数定义中执行此操作,如下所示:

    @dsl.pipeline(name='name')
    def my_pipeline(a=1, b='default value'):
      # pipeline code
      pass
    

    有关完整管道的最小示例,您可以查看this。 根据我使用 Kubeflow 的经验,很多文档都是错误的或不是最新的。很多时候,您必须找到解决方法。

    【讨论】:

      猜你喜欢
      • 2020-12-16
      • 2020-03-27
      • 2021-08-29
      • 2021-07-03
      • 2022-06-29
      • 2022-12-18
      • 2022-09-25
      • 1970-01-01
      • 2020-07-23
      相关资源
      最近更新 更多