在本地服务器上创建管道时的KubeFlow错误

发布于 2025-02-09 01:09:46 字数 2766 浏览 3 评论 0原文

我想为我创建的MNIST模型创建一个KubeFlow管道。我在管道中包括了火车功能并预测作为容器图像的功能。创建客户端实例后,当我调用函数create_run_from_pipeline_func以运行我的管道时,它会引发以下错误。

AttributeError                            Traceback (most recent call last)
<ipython-input-24-bccaab255371> in <module>
     11 
     12 # Submit pipeline directly from pipeline function
---> 13 run_result = client.create_run_from_pipeline_func(pipeline_func, 
     14                                                   experiment_name=experiment_name,
     15                                                   run_name=run_name,

~/.local/lib/python3.8/site-packages/kfp/_client.py in create_run_from_pipeline_func(self, pipeline_func, arguments, run_name, experiment_name, pipeline_conf, namespace, mode, launcher_image, pipeline_root, enable_caching, service_account)
    999                     pipeline_conf=pipeline_conf)
   1000 
-> 1001             return self.create_run_from_pipeline_package(
   1002                 pipeline_file=pipeline_package_path,
   1003                 arguments=arguments,

~/.local/lib/python3.8/site-packages/kfp/_client.py in create_run_from_pipeline_package(self, pipeline_file, arguments, run_name, experiment_name, namespace, pipeline_root, enable_caching, service_account)
   1080         experiment = self.create_experiment(
   1081             name=experiment_name, namespace=namespace)
-> 1082         run_info = self.run_pipeline(
   1083             experiment_id=experiment.id,
   1084             job_name=run_name,

~/.local/lib/python3.8/site-packages/kfp/_client.py in run_pipeline(self, experiment_id, job_name, pipeline_package_path, params, pipeline_id, version_id, pipeline_root, enable_caching, service_account)
    756             html = (
    757                 '<a href="%s/#/runs/details/%s" target="_blank" >Run details</a>.'
--> 758                 % (self._get_url_prefix(), response.run.id))
    759             IPython.display.display(IPython.display.HTML(html))
    760         return response.run

AttributeError: 'NoneType' object has no attribute 'id'

以下内置函数应返回对象,但它返回一个null类型(响应)

response = self._run_api.create_run(body=run_body)

我正在运行以下代码

我已经在客户端实例创建中指定了主机。

client = kfp.Client(host='http://10.152.183.8.nip.io/')
  1. KubeFlow版本:1.21:
  2. KFCTL版本:KFCTL V1.0.1-0.1-0-GF3EDB9B:
  3. KUBERNETES平台:Microk8s
  4. Kubernetes版本:client-gitversion:“ V1.24.0”,Server-Gitversion,Server-Gitversion:
  5. “ Linux 18.04

I wanted to create a kubeflow pipeline for a MNIST model I created.I included the train function and predict function as container images in my pipeline. After creating the client instance, when I call the function create_run_from_pipeline_func to run my pipeline, It throws the following error.

AttributeError                            Traceback (most recent call last)
<ipython-input-24-bccaab255371> in <module>
     11 
     12 # Submit pipeline directly from pipeline function
---> 13 run_result = client.create_run_from_pipeline_func(pipeline_func, 
     14                                                   experiment_name=experiment_name,
     15                                                   run_name=run_name,

~/.local/lib/python3.8/site-packages/kfp/_client.py in create_run_from_pipeline_func(self, pipeline_func, arguments, run_name, experiment_name, pipeline_conf, namespace, mode, launcher_image, pipeline_root, enable_caching, service_account)
    999                     pipeline_conf=pipeline_conf)
   1000 
-> 1001             return self.create_run_from_pipeline_package(
   1002                 pipeline_file=pipeline_package_path,
   1003                 arguments=arguments,

~/.local/lib/python3.8/site-packages/kfp/_client.py in create_run_from_pipeline_package(self, pipeline_file, arguments, run_name, experiment_name, namespace, pipeline_root, enable_caching, service_account)
   1080         experiment = self.create_experiment(
   1081             name=experiment_name, namespace=namespace)
-> 1082         run_info = self.run_pipeline(
   1083             experiment_id=experiment.id,
   1084             job_name=run_name,

~/.local/lib/python3.8/site-packages/kfp/_client.py in run_pipeline(self, experiment_id, job_name, pipeline_package_path, params, pipeline_id, version_id, pipeline_root, enable_caching, service_account)
    756             html = (
    757                 '<a href="%s/#/runs/details/%s" target="_blank" >Run details</a>.'
--> 758                 % (self._get_url_prefix(), response.run.id))
    759             IPython.display.display(IPython.display.HTML(html))
    760         return response.run

AttributeError: 'NoneType' object has no attribute 'id'

the following inbuilt function should return an object but it returns a null type(response)

response = self._run_api.create_run(body=run_body)

I am running the following code:

I have specified the host inside the client instance creation.

client = kfp.Client(host='http://10.152.183.8.nip.io/')
  1. Kubeflow version:1.21:
  2. kfctl version: kfctl v1.0.1-0-gf3edb9b:
  3. Kubernetes platform: Microk8s
  4. Kubernetes version: Client-GitVersion:"v1.24.0" , Server-GitVersion:"v1.21.12-3+6937f71915b56b":
  5. OS : Linux 18.04

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文