PySyft icon indicating copy to clipboard operation
PySyft copied to clipboard

KeyError: 'evaluate'

Open ERICPENGZ opened this issue 6 years ago • 3 comments

Describe the bug

when I run PySyft/examples/tutorials/advanced/websockets-example-MNIST-parallel/run_websocket_client.py

/usr/local/lib/python3.7/site-packages/syft/workers/websocket_server.py:93: RuntimeWarning: coroutine 'WebsocketServerWorker._consumer_handler' was never awaited self._consumer_handler(websocket) RuntimeWarning: Enable tracemalloc to get the object allocation traceback /usr/local/lib/python3.7/site-packages/syft/workers/websocket_server.py:93: RuntimeWarning: coroutine 'WebsocketServerWorker._consumer_handler' was never awaited self.consumer_handler(websocket) RuntimeWarning: Enable tracemalloc to get the object allocation traceback /usr/local/lib/python3.7/site-packages/syft/workers/websocket_server.py:93: RuntimeWarning: coroutine 'WebsocketServerWorker.consumer_handler' was never awaited self.consumer_handler(websocket) RuntimeWarning: Enable tracemalloc to get the object allocation traceback /usr/local/lib/python3.7/site-packages/syft/frameworks/torch/hook/hook.py:535: UserWarning: To copy construct from a tensor, it is recommended to use sourceTensor.clone().detach() or sourceTensor.clone().detach().requires_grad(True), rather than torch.tensor(sourceTensor). current_tensor = hook_self.torch.native_tensor(*args, **kwargs) /usr/local/lib/python3.7/site-packages/syft/frameworks/torch/hook/hook.py:535: UserWarning: To copy construct from a tensor, it is recommended to use sourceTensor.clone().detach() or sourceTensor.clone().detach().requires_grad(True), rather than torch.tensor(sourceTensor). current_tensor = hook_self.torch.native_tensor(*args, **kwargs) /usr/local/lib/python3.7/site-packages/syft/frameworks/torch/hook/hook.py:535: UserWarning: To copy construct from a tensor, it is recommended to use sourceTensor.clone().detach() or sourceTensor.clone().detach().requires_grad(True), rather than torch.tensor(sourceTensor). current_tensor = hook_self.torch.native_tensor(*args, **kwargs) /usr/local/lib/python3.7/site-packages/syft/workers/websocket_server.py:93: RuntimeWarning: coroutine 'WebsocketServerWorker._consumer_handler' was never awaited self.consumer_handler(websocket) RuntimeWarning: Enable tracemalloc to get the object allocation traceback /usr/local/lib/python3.7/site-packages/syft/frameworks/torch/hook/hook.py:535: UserWarning: To copy construct from a tensor, it is recommended to use sourceTensor.clone().detach() or sourceTensor.clone().detach().requires_grad(True), rather than torch.tensor(sourceTensor). current_tensor = hook_self.torch.native_tensor(*args, **kwargs) 2020-03-12 13:36:22,100 | Task exception was never retrieved future: <Task finished coro=<WebsocketServerWorker._producer_handler() done, defined at /usr/local/lib/python3.7/site-packages/syft/workers/websocket_server.py:95> exception=AttributeError("'dict' object has no attribute 'owner'")> Traceback (most recent call last): File "/usr/local/lib/python3.7/site-packages/syft/generic/frameworks/hook/hook_args.py", line 663, in register_response register_response_function = register_response_functions[attr_id] KeyError: 'evaluate'

ERICPENGZ avatar Mar 12 '20 05:03 ERICPENGZ

I will take a look

rotalex avatar Mar 15 '20 22:03 rotalex

Hey @ERICPENGZ I could not reproduce your problem. I ran the following commands in a docker container and everything worked fine: python start_websocket_servers.py python run_websocket_client.py

Could you try to pull the latest master and retest?

rotalex avatar Mar 18 '20 18:03 rotalex

This issue has been marked stale because it has been open 30 days with no activity. Leave a comment or remove the stale label to unmark it. Otherwise, this will be closed in 7 days.

github-actions[bot] avatar May 22 '20 00:05 github-actions[bot]