对于拥有构建 Kubeflow 流水线经验的开发者来说,一定要了解 Agent Platform Pipelines 与 Kubeflow Pipelines 的以下不同之处。
数据传递(输入/输出)
- 在 Kubeflow Pipelines SDK v1 和 Kubeflow Pipelines SDK v2 中,使用输入和输出传递数据的方式有所不同。Kubeflow Pipelines SDK v2 分离了参数和工件,并且它们不能相互传递。如需了解详情,请参阅 Kubeflow Pipelines 流水线基础知识和 Kubeflow Pipelines 数据类型。
特定领域的语言 (DSL) 版本用法
Agent Platform Pipelines 可以运行使用 TFX v0.30.0 或更高版本 或 Kubeflow Pipelines SDK v2 网域特定语言 (DSL) 构建的流水线。
Kubeflow Pipelines SDK v2 DSL 在 Kubeflow Pipelines SDK v1.6 或更高版本中提供。
Kubeflow Pipelines 可以运行使用 Kubeflow Pipelines SDK 构建的流水线。Kubeflow Pipelines v1.6 或更高版本也可以运行使用 Kubeflow Pipelines SDK v2 DSL 构建的流水线。
存储
Kubeflow Pipelines 和 Agent Platform Pipelines 以不同方式处理存储。在 Kubeflow Pipelines 中,您可以使用 Kubernetes 资源(如永久性卷声明)。在 Agent Platform Pipelines 您的数据存储在 Cloud Storage 上,并使用 Cloud Storage FUSE装载到组件中 。
在 Agent Platform Pipelines 中,您可以使用 Google Cloud 服务来提供 资源。例如,您可以使用 Cloud Storage FUSE 在流水线 步骤中将 Cloud Storage 存储桶作为已装载的卷进行访问。如果您的 Cloud Storage URI 为
gs://example-bucket/example-pipeline,则流水线组件的容器可以使用 Cloud Storage FUSE 通过以下路径访问该 URI:/gcs/example-bucket/example-pipeline。使用 Agent Platform Pipelines 运行流水线时,必须在
@pipeline注解中或在创建流水线运行时指定流水线根目录。在 Kubeflow Pipelines 中,指定流水线根目录是可选的。默认情况下,使用 MinIO 存储流水线运行的 工件。
Agent Platform Pipelines 不支持的功能
Agent Platform Pipelines 不支持以下 Kubeflow Pipelines 功能。
缓存到期:在 Kubeflow Pipelines 中,通过使用 Kubeflow Pipelines SDK v1 DSL,您可以指定 缓存组件的执行作业 会在指定时间后过期。
您无法使用 Kubeflow Pipelines SDK v2 DSL 为组件执行指定超时时长。
在 Agent Platform Pipelines 中,当您使用
create_run_from_job_spec运行流水线时,可以使用enable_caching参数指定此流水线运行不使用缓存。递归:在 Kubeflow Pipelines 中,您可以指定递归调用的流水线 组件。
Agent Platform Pipelines 不支持以递归方式调用的流水线组件。