首页 > 解决方案 > Kubeflow 管道 - 将字符串传递给输出

问题描述

通过 Kubeflow 管道中的输出发送字符串的最简单方法是什么?我想在我的第一个组件中创建一个时间戳,然后将该时间戳发送到管道中的每个连续步骤。

我见过的发送输出的唯一方法是通过文档中的文件路径。这是我的 component.yaml 文件的一部分,它显示了我的意思:

name: CSV Filter
description: Connects to GCSPath and filters columns using specific column name
inputs:
- {name: Training Set URI, type: GCSPath, description: 'GCS path to training set CSV'}
- {name: Filter Column, type: String, default: 'model_type', description: 'Filter Column Name'}
- {name: Filter Value, type: String, description: 'The value you are filtering for.'}
- {name: Output 1 URI template, type: GCSPath, description: 'GCS path template for filtered training set CSV'}
outputs:
- {name: Output 1 URI, type: GCSPath, description: 'GCS path for filtered training set CSV'}
- {name: Timetag File, type: GCSPath, description: 'Timetag based on time since last UNIX Epoch. Used for version control.'}

感兴趣的区域是输出中的“时间标签文件”。而不是创建一个文件,我只想发送一个字符串。只需将“type:GCSPath”更改为“type:String”就足够了,以便在我的管道步骤中,我将能够访问该字符串?

换句话说,我应该将字符串保存到组件内python代码中的文件路径还是有更好的方法?

标签: kubeflow

解决方案


推荐阅读