我正在探索 Vertex AI Pipelines 以运行机器学习训练作业。kubeflow管道文档清楚地说明了如何参数化容器的命令/参数。
是否也可以将输入传递给组件的环境变量或图像名称?组件的这种大摇大摆的模式表明可以做到这一点,但是这个例子失败了:
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 添加环境变量或更改图像名称。