PySyft
PySyft copied to clipboard
Error when launching the federated-learning exemple mcfl_create_plan : host_federated_training generate "Expecting value: line 1 column 1 (char 0)"
Description
When I launch the exemple notebook mcfl_create_plan, I found an error when launching the process.
How to Reproduce
- Launch the fllowing script server.py:
- Launch the jupyter notebook: examples/federated-learning/model-centric/mcfl_create_plan.ipynb
Screenshots
I obtained the following error:
The 4th part of the JSON file seems to be empty, but I cannot find why the message is divided in 4 parts. Does someone found the same error ?
System Information
- OS: Windows
- OS Version: 10
- Language Version: Python 3.7
- Browser: Edge
Hi, have you solved this issue? I met the same problem here, but it returns BrokenPipeError: [Errno 32] Broken pipe
. The full screenshot is like this:
I googled this error online, but this error usually caused by torch.DataLoader which is not related to my issue. I think this may be caused by socket service closed, but I don't know why the PyGrid socket is disconnected. The screenshot of the terminal is like this:
Appreciate if you know how to fix this.
And as for this error you met, this may because the json.loads(self.ws.recv())
, you can try to add this argument json.loads(self.ws.recv(), strict=False)
to see if your problem resolved. Hope this can help you.
Since I still have issues on windows, I have tried this script on ubuntu docker container and I found the same error as your. Did you found a solution to this problem?
Not exactly, I still stuck here, and I don't know which part went wrong. I assume it may be caused by PyGrid does not start a service properly, and the socket went to sleep mode, but I'm confident about this. I actually got a similar error traceback in issue #5521 but this problem is not resolved yet.
Don't you think it is due to the fact that we launch the server and the client on the same computer ?
I think this library can be used for virtual set-up, i.e., place worker and host in one device and use socket to connect the different pipes in localhost.
@LaplaceZhang i have met the same problem about
[2021-11-25 07:43:19]: 8 DEBUG WebSocket request accepted, switching protocols
[2021-11-25 07:43:19]: 8 DEBUG Closed WebSocket
[2021-11-25 07:43:19]: 8 DEBUG Failed to write closing frame -> closing socket
[2021-11-25 07:43:19]: 8 DEBUG Closed WebSocket
and then
BrokenPipeError: [Errno 32] Broken pipe
do you know how to fix that now ?really appreciate.
0.5 is no longer supported.