FATE
FATE copied to clipboard
Error when defining pipeline
Describe the bug There is error when trying to define pipeline.
To Reproduce Steps to reproduce the behavior: when trying to define pipeline after successful data uploaded the following error accured:
Expected behavior evaluation_0 = Evaluation(name='evaluation_0', eval_type='multi')
pipeline.add_component(reader_0) pipeline.add_component(data_transform_0, data=Data(data=reader_0.output.data)) pipeline.add_component(reader_1) pipeline.add_component( data_transform_1, data=Data( data=reader_1.output.data), model=Model( data_transform_0.output.model)) pipeline.add_component(homo_secureboost_0, data=Data(train_data=data_transform_0.output.data, validate_data=data_transform_1.output.data )) pipeline.add_component(evaluation_0, data=Data(homo_secureboost_0.output.data))
error: 2022-09-26 12:28:25.737 | ERROR | IPython.utils.dir2:get_real_method:65 - An error has been caught in function 'get_real_method', process 'MainProcess' (4726), thread 'MainThread' (140398342230976): Traceback (most recent call last):
File "/home/seyedmahmouds/anaconda3/lib/python3.9/runpy.py", line 197, in _run_module_as_main
return _run_code(code, main_globals, None,
│ │ └ {'name': 'main', 'doc': 'Entry point for launching an IPython kernel.\n\nThis is separate from the ipykernel pack...
│ └ <code object
.... .... ....
File "/home/seyedmahmouds/anaconda3/lib/python3.9/site-packages/IPython/utils/dir2.py", line 74, in get_real_method m = getattr(obj, name, None) │ └ 'repr_javascript' └ <pipeline.backend.pipeline.PipeLine object at 0x7fb08686b7c0> File "/home/seyedmahmouds/anaconda3/lib/python3.9/site-packages/pipeline/backend/pipeline.py", line 637, in getattr return self.getattribute(attr) │ │ └ 'repr_javascript' │ └ <slot wrapper 'getattribute' of 'object' objects> └ <pipeline.backend.pipeline.PipeLine object at 0x7fb08686b7c0>
AttributeError: 'PipeLine' object has no attribute 'repr_javascript' <pipeline.backend.pipeline.PipeLine at 0x7fb08686b7c0>
Desktop (please complete the following information):
- OS: Ubuntu
- Browser Chrome
Which version is your fate-client?
Hi @mgqa34
I installed FATE=1.9.0 and as it shown after pip install fate_client :it shows:
(from requests-oauthlib>=0.7.0->google-auth-oauthlib<0.5,>=0.4.1->tensorboard<2.11,>=2.10->tensorflow>=2.4.1->fate_client) (3.2.0)
Hi @mgqa34
I installed FATE=1.9.0 and as it shown after pip install fate_client :it shows:
(from requests-oauthlib>=0.7.0->google-auth-oauthlib<0.5,>=0.4.1->tensorboard<2.11,>=2.10->tensorflow>=2.4.1->fate_client) (3.2.0)
Execute "pip list | grep fate-client" to get the real version of fate-client please. Meanwhile, can you post full error messages? For Example, which line of pipeline cause errors?
Thank you @mgqa34
fate-clients version is : pip list | grep fate-client fate-client 0.3.0.post1
and the error happens after running: pipeline.add_component(reader_0)
and the error is like following: (final error shows: AttributeError: 'PipeLine' object has no attribute 'repr_javascript')
2022-09-29 19:13:45.055 | ERROR | IPython.utils.dir2:get_real_method:65 - An error has been caught in function 'get_real_method', process 'MainProcess' (92308), thread 'MainThread' (139698341172160): Traceback (most recent call last):
File "/home/seyedmahmouds/anaconda3/lib/python3.9/runpy.py", line 197, in _run_module_as_main
return _run_code(code, main_globals, None,
│ │ └ {'name': 'main', 'doc': 'Entry point for launching an IPython kernel.\n\nThis is separate from the ipykernel pack...
│ └ <code object
…..
….
pipeline.add_component(reader_0)
│ │ └ <pipeline.component.reader.Reader object at 0x7f0d8b358be0>
│ └ <function PipeLine.add_component at 0x7f0d8b3cf1f0>
└ <pipeline.backend.pipeline.PipeLine object at 0x7f0d8b3629a0>
File "/home/seyedmahmouds/anaconda3/lib/python3.9/site-packages/IPython/core/displayhook.py", line 262, in call format_dict, md_dict = self.compute_format_data(result) │ │ └ <pipeline.backend.pipeline.PipeLine object at 0x7f0d8b3629a0> │ └ <function DisplayHook.compute_format_data at 0x7f0e0bb0d1f0> └ <ipykernel.displayhook.ZMQShellDisplayHook object at 0x7f0e08622a00> File "/home/seyedmahmouds/anaconda3/lib/python3.9/site-packages/IPython/core/displayhook.py", line 151, in compute_format_data return self.shell.display_formatter.format(result) │ │ └ <pipeline.backend.pipeline.PipeLine object at 0x7f0d8b3629a0> │ └ <traitlets.traitlets.Instance object at 0x7f0e0bb07580> └ <ipykernel.displayhook.ZMQShellDisplayHook object at 0x7f0e08622a00> File "/home/seyedmahmouds/anaconda3/lib/python3.9/site-packages/IPython/core/formatters.py", line 178, in format data = formatter(obj) │ └ <pipeline.backend.pipeline.PipeLine object at 0x7f0d8b3629a0> └ <IPython.core.formatters.JavascriptFormatter object at 0x7f0d8b32b910> File "/home/seyedmahmouds/anaconda3/lib/python3.9/site-packages/decorator.py", line 232, in fun return caller(func, *(extras + args), **kw) │ │ │ │ └ {} │ │ │ └ (<IPython.core.formatters.JavascriptFormatter object at 0x7f0d8b32b910>, <pipeline.backend.pipeline.PipeLine object at 0x7f0d... │ │ └ () │ └ <function BaseFormatter.call at 0x7f0e0bb33700> └ <function catch_format_error at 0x7f0e0bb333a0> File "/home/seyedmahmouds/anaconda3/lib/python3.9/site-packages/IPython/core/formatters.py", line 222, in catch_format_error r = method(self, *args, **kwargs) │ │ │ └ {} │ │ └ (<pipeline.backend.pipeline.PipeLine object at 0x7f0d8b3629a0>,) │ └ <IPython.core.formatters.JavascriptFormatter object at 0x7f0d8b32b910> └ <function BaseFormatter.call at 0x7f0e0bb33700> File "/home/seyedmahmouds/anaconda3/lib/python3.9/site-packages/IPython/core/formatters.py", line 341, in call method = get_real_method(obj, self.print_method) │ │ │ └ <traitlets.traitlets.ObjectName object at 0x7f0e0bb3c460> │ │ └ <IPython.core.formatters.JavascriptFormatter object at 0x7f0d8b32b910> │ └ <pipeline.backend.pipeline.PipeLine object at 0x7f0d8b3629a0> └ <function get_real_method at 0x7f0e0bc650d0>
File "/home/seyedmahmouds/anaconda3/lib/python3.9/site-packages/IPython/utils/dir2.py", line 65, in get_real_method canary = getattr(obj, 'ipython_canary_method_should_not_exist', None) └ <pipeline.backend.pipeline.PipeLine object at 0x7f0d8b3629a0> File "/home/seyedmahmouds/anaconda3/lib/python3.9/site-packages/pipeline/backend/pipeline.py", line 637, in getattr return self.getattribute(attr) │ │ └ 'ipython_canary_method_should_not_exist' │ └ <slot wrapper 'getattribute' of 'object' objects> └ <pipeline.backend.pipeline.PipeLine object at 0x7f0d8b3629a0>
AttributeError: 'PipeLine' object has no attribute 'ipython_canary_method_should_not_exist' 2022-09-29 19:13:45.462 | ERROR | IPython.utils.dir2:get_real_method:74 - An error has been caught in function 'get_real_method', process 'MainProcess' (92308), thread 'MainThread' (139698341172160): Traceback (most recent call last):
File "/home/seyedmahmouds/anaconda3/lib/python3.9/runpy.py", line 197, in _run_module_as_main return _run_code(code, main_globals, None, │ │ └ {'name': 'main', 'doc': 'Entry point for …. ….
pipeline.add_component(reader_0)
│ │ └ <pipeline.component.reader.Reader object at 0x7f0d8b358be0>
│ └ <function PipeLine.add_component at 0x7f0d8b3cf1f0>
└ <pipeline.backend.pipeline.PipeLine object at 0x7f0d8b3629a0>
File "/home/seyedmahmouds/anaconda3/lib/python3.9/site-packages/IPython/core/displayhook.py", line 262, in call format_dict, md_dict = self.compute_format_data(result) │ │ └ <pipeline.backend.pipeline.PipeLine object at 0x7f0d8b3629a0> │ └ <function DisplayHook.compute_format_data at 0x7f0e0bb0d1f0> └ <ipykernel.displayhook.ZMQShellDisplayHook object at 0x7f0e08622a00> File "/home/seyedmahmouds/anaconda3/lib/python3.9/site-packages/IPython/core/displayhook.py", line 151, in compute_format_data return self.shell.display_formatter.format(result) │ │ └ <pipeline.backend.pipeline.PipeLine object at 0x7f0d8b3629a0> │ └ <traitlets.traitlets.Instance object at 0x7f0e0bb07580> └ <ipykernel.displayhook.ZMQShellDisplayHook object at 0x7f0e08622a00> File "/home/seyedmahmouds/anaconda3/lib/python3.9/site-packages/IPython/core/formatters.py", line 178, in format data = formatter(obj) │ └ <pipeline.backend.pipeline.PipeLine object at 0x7f0d8b3629a0> └ <IPython.core.formatters.JavascriptFormatter object at 0x7f0d8b32b910> File "/home/seyedmahmouds/anaconda3/lib/python3.9/site-packages/decorator.py", line 232, in fun return caller(func, *(extras + args), **kw) │ │ │ │ └ {} │ │ │ └ (<IPython.core.formatters.JavascriptFormatter object at 0x7f0d8b32b910>, <pipeline.backend.pipeline.PipeLine object at 0x7f0d... │ │ └ () │ └ <function BaseFormatter.call at 0x7f0e0bb33700> └ <function catch_format_error at 0x7f0e0bb333a0> File "/home/seyedmahmouds/anaconda3/lib/python3.9/site-packages/IPython/core/formatters.py", line 222, in catch_format_error r = method(self, *args, **kwargs) │ │ │ └ {} │ │ └ (<pipeline.backend.pipeline.PipeLine object at 0x7f0d8b3629a0>,) │ └ <IPython.core.formatters.JavascriptFormatter object at 0x7f0d8b32b910> └ <function BaseFormatter.call at 0x7f0e0bb33700> File "/home/seyedmahmouds/anaconda3/lib/python3.9/site-packages/IPython/core/formatters.py", line 341, in call method = get_real_method(obj, self.print_method) │ │ │ └ <traitlets.traitlets.ObjectName object at 0x7f0e0bb3c460> │ │ └ <IPython.core.formatters.JavascriptFormatter object at 0x7f0d8b32b910> │ └ <pipeline.backend.pipeline.PipeLine object at 0x7f0d8b3629a0> └ <function get_real_method at 0x7f0e0bc650d0>
File "/home/seyedmahmouds/anaconda3/lib/python3.9/site-packages/IPython/utils/dir2.py", line 74, in get_real_method m = getattr(obj, name, None) │ └ 'repr_javascript' └ <pipeline.backend.pipeline.PipeLine object at 0x7f0d8b3629a0> File "/home/seyedmahmouds/anaconda3/lib/python3.9/site-packages/pipeline/backend/pipeline.py", line 637, in getattr return self.getattribute(attr) │ │ └ 'repr_javascript' │ └ <slot wrapper 'getattribute' of 'object' objects> └ <pipeline.backend.pipeline.PipeLine object at 0x7f0d8b3629a0>
AttributeError: 'PipeLine' object has no attribute 'repr_javascript' <pipeline.backend.pipeline.PipeLine at 0x7f0d8b3629a0> [ ]: [ ]: [ ]:
Oh, the version of fate-client is a little old. If you are using fate-v1.9.0, please upgrade fate-client to 1.9.0 too, the version of fate-client and fate should be matched. If your fate & client's version are lower than fate-v1.9.0,modify pipeline file in python site-packages is another way to fix this problem. Search "__getattr__" keyword in /home/seyedmahmouds/anaconda3/lib/python3.9/site-packages/pipeline/backend/pipeline.py,then comment out its previous line("@LOGGER.catch(reraise=True)" ). Restart jupyter and run the script again.
Hi @mgqa34
Thank you for your help. It works after modifying based on your second suggestion. Also I saw a problem when I trying to run code for homo secure boost. I will appreciate it if you could help me with that. (https://github.com/FederatedAI/FATE/issues/4360)
This issue has been marked as stale because it has been open for 365 days with no activity. If this issue is still relevant or if there is new information, please feel free to update or reopen it.
This issue was closed because it has been inactive for 1 days since being marked as stale. If this issue is still relevant or if there is new information, please feel free to update or reopen it.