Pysyft 联邦学习,Websockets 错误
Pysyft Federated learning, Error with Websockets
我正在尝试 运行 来自 pysyft (https://github.com/OpenMined/PySyft/blob/dev/examples/tutorials/advanced/websockets-example-MNIST-parallel/Asynchronous-federated-learning-on-MNIST.ipynb) 的联邦学习,它创建远程工作者并通过 websockets 连接到他们。但是我在下面的评估步骤中遇到错误。
future: <Task finished coro=<WebsocketServerWorker._producer_handler() done, defined at C:\Users\Public\Anaconda\lib\site-packages\syft\workers\websocket_server.py:95> exception=AttributeError("'dict' object has no attribute 'owner'")>
Traceback (most recent call last):
File "C:\Users\Public\Anaconda\lib\site-packages\syft\generic\frameworks\hook\hook_args.py", line 663, in register_response
register_response_function = register_response_functions[attr_id]
KeyError: 'evaluate'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\Users\Public\Anaconda\lib\site-packages\syft\workers\websocket_server.py", line 113, in _producer_handler
response = self._recv_msg(message)
File "C:\Users\Public\Anaconda\lib\site-packages\syft\workers\websocket_server.py", line 124, in _recv_msg
return self.recv_msg(message)
File "C:\Users\Public\Anaconda\lib\site-packages\syft\workers\base.py", line 310, in recv_msg
response = self._message_router[type(msg)](msg.contents)
File "C:\Users\Public\Anaconda\lib\site-packages\syft\workers\base.py", line 457, in execute_command
command_name, response, list(return_ids), self
File "C:\Users\Public\Anaconda\lib\site-packages\syft\generic\frameworks\hook\hook_args.py", line 672, in register_response
new_response = register_response_function(response, response_ids=response_ids, owner=owner)
File "C:\Users\Public\Anaconda\lib\site-packages\syft\generic\frameworks\hook\hook_args.py", line 766, in <lambda>
return lambda x, **kwargs: f(lambdas, x, **kwargs)
File "C:\Users\Public\Anaconda\lib\site-packages\syft\generic\frameworks\hook\hook_args.py", line 522, in two_fold
return lambdas[0](args[0], **kwargs), lambdas[1](args[1], **kwargs)
File "C:\Users\Public\Anaconda\lib\site-packages\syft\generic\frameworks\hook\hook_args.py", line 744, in <lambda>
else lambda i, **kwargs: register_tensor(i, **kwargs)
File "C:\Users\Public\Anaconda\lib\site-packages\syft\generic\frameworks\hook\hook_args.py", line 712, in register_tensor
tensor.owner = owner
AttributeError: 'dict' object has no attribute 'owner'
他们的论坛没有明确的答案。有没有人知道这个脚本中的问题是什么。
我的 syft 版本:
syft : 0.2.3a1
syft-proto : 0.1.1a1.post12
torch : 1.4.0
我也遇到了这个问题,并在 https://github.com/OpenMined/PySyft/pull/2948
中进行了修复
我正在尝试 运行 来自 pysyft (https://github.com/OpenMined/PySyft/blob/dev/examples/tutorials/advanced/websockets-example-MNIST-parallel/Asynchronous-federated-learning-on-MNIST.ipynb) 的联邦学习,它创建远程工作者并通过 websockets 连接到他们。但是我在下面的评估步骤中遇到错误。
future: <Task finished coro=<WebsocketServerWorker._producer_handler() done, defined at C:\Users\Public\Anaconda\lib\site-packages\syft\workers\websocket_server.py:95> exception=AttributeError("'dict' object has no attribute 'owner'")>
Traceback (most recent call last):
File "C:\Users\Public\Anaconda\lib\site-packages\syft\generic\frameworks\hook\hook_args.py", line 663, in register_response
register_response_function = register_response_functions[attr_id]
KeyError: 'evaluate'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\Users\Public\Anaconda\lib\site-packages\syft\workers\websocket_server.py", line 113, in _producer_handler
response = self._recv_msg(message)
File "C:\Users\Public\Anaconda\lib\site-packages\syft\workers\websocket_server.py", line 124, in _recv_msg
return self.recv_msg(message)
File "C:\Users\Public\Anaconda\lib\site-packages\syft\workers\base.py", line 310, in recv_msg
response = self._message_router[type(msg)](msg.contents)
File "C:\Users\Public\Anaconda\lib\site-packages\syft\workers\base.py", line 457, in execute_command
command_name, response, list(return_ids), self
File "C:\Users\Public\Anaconda\lib\site-packages\syft\generic\frameworks\hook\hook_args.py", line 672, in register_response
new_response = register_response_function(response, response_ids=response_ids, owner=owner)
File "C:\Users\Public\Anaconda\lib\site-packages\syft\generic\frameworks\hook\hook_args.py", line 766, in <lambda>
return lambda x, **kwargs: f(lambdas, x, **kwargs)
File "C:\Users\Public\Anaconda\lib\site-packages\syft\generic\frameworks\hook\hook_args.py", line 522, in two_fold
return lambdas[0](args[0], **kwargs), lambdas[1](args[1], **kwargs)
File "C:\Users\Public\Anaconda\lib\site-packages\syft\generic\frameworks\hook\hook_args.py", line 744, in <lambda>
else lambda i, **kwargs: register_tensor(i, **kwargs)
File "C:\Users\Public\Anaconda\lib\site-packages\syft\generic\frameworks\hook\hook_args.py", line 712, in register_tensor
tensor.owner = owner
AttributeError: 'dict' object has no attribute 'owner'
他们的论坛没有明确的答案。有没有人知道这个脚本中的问题是什么。
我的 syft 版本:
syft : 0.2.3a1
syft-proto : 0.1.1a1.post12
torch : 1.4.0
我也遇到了这个问题,并在 https://github.com/OpenMined/PySyft/pull/2948
中进行了修复