You need to enable JavaScript to run this app. GCP中集成Kubeflow Pipeline的集群运行失败求助
优惠活动
大模型
产品
解决方案
定价
更多

GCP中集成Kubeflow Pipeline的集群运行失败求助

Kubeflow V2 Pipeline运行失败排查与解决

问题现象

使用Kubeflow V2编译器生成YAML并上传后运行失败,报错如下:

FileNotFoundError: [Errno 2] No such file or directory: '/gcs/my_bucket/tfx_taxi_simple/7e62cf81-31a1-42bd-b145-47c3d1f24758/pipeline/test-updated2/899ccb6a-0f39-4cc8-8448-ef8c614009cc/get-dataframe/df_path.csv'
F0202 13:03:30.504261      16 main.go:50] Failed to execute component: exit status 1
time="2023-02-02T13:03:30.507Z" level=error msg="cannot save artifact /tmp/outputs/test_df_path/data" argo=true error="stat /tmp/outputs/test_df_path/data: no such file or directory"
time="2023-02-02T13:03:30.507Z" level=error msg="cannot save artifact /tmp/outputs/train_df_path/data" argo=true error="stat /tmp/outputs/train_df_path/data: no such file or directory"
Error: exit status 1
Runtime execution graph. Only steps that are currently running or have already completed are shown.

自身生成的YAML与官方示例格式存在差异,但官方示例Pipeline可正常运行。

排查与解决步骤

  • 版本对齐检查
    确认本地编译用的kfp版本与Kubeflow集群版本完全匹配。V2编译器不同小版本间YAML格式差异明显,比如kfp==1.8.x与kfp==2.0.x生成的结构差异较大。执行pip show kfp查看本地版本,对比集群端Kubeflow版本(可通过UI右上角关于页查看),不一致则调整本地版本后重新编译。

  • GCS路径与权限验证
    手动检查GCS路径/gcs/my_bucket/tfx_taxi_simple/7e62cf81-31a1-42bd-b145-47c3d1f24758/pipeline/test-updated2/899ccb6a-0f39-4cc8-8448-ef8c614009cc/get-dataframe/下是否存在df_path.csv,可使用命令gsutil ls gs://my_bucket/tfx_taxi_simple/7e62cf81-31a1-42bd-b145-47c3d1f24758/pipeline/test-updated2/899ccb6a-0f39-4cc8-8448-ef8c614009cc/get-dataframe/验证;同时确认Kubeflow运行使用的服务账号拥有该GCS桶的读写权限,可通过云平台IAM页面检查权限配置。

  • 组件输出路径配置检查
    报错提示输出目录不存在,需检查自定义组件逻辑:确保代码中在写入输出文件前执行os.makedirs(os.path.dirname(output_path), exist_ok=True)创建目录;核对组件定义中的输出参数路径与代码实际写入路径是否一致,避免拼写错误。

  • YAML格式差异对比分析
    将自身生成的YAML与官方示例逐段对比,重点检查components下的输入输出定义、pipeline中的参数传递逻辑、deploymentSpec配置是否一致;若使用kfp.v2.dsl.component装饰器,确认是否正确指定output_component_file,且组件接口定义(输入输出类型、名称)与示例对齐。

  • 本地测试组件逻辑
    在Colab或本地环境单独运行get-dataframe组件代码,验证是否能正确生成df_path.csv并写入指定路径,排除组件自身逻辑错误。

内容的提问来源于stack exchange,提问作者user19195895

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.08.02 12:51:16