1

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
Promila Ghosh
  • 389
  • 4
  • 12
  • Does this answer your question? [Why do I get AttributeError: 'NoneType' object has no attribute 'something'?](https://stackoverflow.com/questions/8949252/why-do-i-get-attributeerror-nonetype-object-has-no-attribute-something) – Ulrich Eckhardt Jun 21 '22 at 07:28
  • No it does not. There seems to be an internal issue in which one of the internal components of source code is not return an object. – Soumil Maitra Jun 21 '22 at 08:16
  • At least it should help you understand the cause and improve your question. As it stands, the title is just not helpful and specific to your problem. – Ulrich Eckhardt Jun 21 '22 at 08:40
  • I understood the error as to what it stands for. But how to make internal functions return an object instead of null is what I am asking for. Let me edit and add as to what I want to do. – Soumil Maitra Jun 21 '22 at 09:21
  • Ohk I'll change it. – Soumil Maitra Jun 22 '22 at 05:52

0 Answers0