【发布时间】:2021-09-08 08:03:14
【问题描述】:
我正在探索 Vertex AI Pipelines 以运行机器学习训练作业。 kubeflow pipeline docs 明确了如何参数化容器的命令/参数。
是否也可以将输入传递给环境变量或组件的图像名称?组件的 swagger schema 表明可以这样做,但此示例失败:
implementation:
container:
image: {concat: ["us.gcr.io/vcm-ml/emulator", {inputValue: tag}]
# command is a list of strings (command-line arguments).
# The YAML language has two syntaxes for lists and you can use either of them.
# Here we use the "flow syntax" - comma-separated strings inside square brackets.
command: [
python3,
# Path of the program inside the container
/pipelines/component/src/program.py,
--input1-path,
{inputPath: input_1},
--param1,
--output1-path,
]
env:
NAME: {inputValue: env}
inputs:
- {name: tag, type: String}
- {name: env, type: String}
- {name: input_1, type: String, description: 'Data for input_1'}
支持将{inputValue} 传递给container.env 或container.tag。或者,是否可以使用 V2 python DSL 添加环境变量或更改图像名称。
【问题讨论】:
标签: google-cloud-platform kubeflow-pipelines google-cloud-ai-platform-pipelines