googleapis / googleapis/python-aiplatform

Kubeflow dsl.IfPresentPlaceholder not working properly in Vertex AI pipelines

未关闭
#4,164 2 条评论 2 个 reaction 已指派 0 人 在 GitHub 查看
api: vertex-ai
主要语言
Python
星标
905
派生
465
平均合并
1 天 13 小时
30 天内合并 PR
44

描述

Hi,

I am using Kubeflow in Vertex AI pipelines. I tried to use the `dsl.IfPresentPlaceholder` to parameterize some input arguments of the @container_component. It looks like the placeholder is not replaced by the actual value at the runtime, which causes the step execution to fail. I would like to know why this behavior is happening. Does Vertex AI support this feature or this is just Kubeflow native?

#### Environment details

- Python version: `3.9`
- `google-cloud-aiplatform` version: `1.59.0`

#### Code example

I am implementing the placeholder in the following way (dummy example):

```python
@dsl.container_component
def hello_someone(optional_name: str = None):
return dsl.ContainerSpec(
image='python:3.9',
command=[
'say_hello',
dsl.IfPresentPlaceholder(
input_name='optional_name', then=['--name', optional_name])
])
```

I design the pipeline, compile, and run it using the `pipeline_jobs.PipelineJob` method.
When I inspect the logs in Vertex Ai I see that the placeholder is not replaced and it is displayed as:

```
{"IfPresent": {"InputName": "optional_name", "Then": ["--name", "null"]}}
```
In this case I don't pass the `optinal_name` argument on the step.

Thanks,
Joāo

贡献指南

打开贡献指南

调研方向

从容器组件示例以及使用 pipeline_jobs.PipelineJob 的编译/运行路径开始;将编译后的占位符与所示的 Vertex AI 运行时日志进行比较。检查 google-cloud-aiplatform 1.59.0 是否在 Vertex AI pipelines 中支持 dsl.IfPresentPlaceholder;完成的标准是得到经过确认的兼容性说明,以及可复现的解决方案或已记录的限制。

由索引模型根据 Issue 内容生成。

评估

技术栈
google-cloud, python
领域
cloud, machine-learning
Issue 类型
缺陷
难度
4/5
预计耗时
3-5 天
活跃度
停滞
描述清晰度
需要澄清
新手友好度
28/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。