I've experimented on getting PySyft to work with remote worker with its own dataset.
During these, I found out the search from local will cause the data deleted on the remote.
Relevant files in this gist.
To trigger the error,
python remote.py in one terminal windowpython local.py from another terminal windowYou will see the results:
$ python remote.py
Objects: {94139650912: tensor([-1., 2.])
Tags: x
Shape: torch.Size([2])}
worker <WebsocketServerWorker id:0 #tensors:1> received SEARCH (b'x',)
worker <WebsocketServerWorker id:0 #tensors:1> received OBJ_DEL 94139650912
Objects: {}
$ python local.py
Local objects before search {}
Search result: [(Wrapper)>[PointerTensor | me:68744693343 -> 0:13527568418]]
Local objects after search {}
As the first one showed: the remote worker actually received two actions SEARCH and OBJ_DEL in correspondence with the search command on Line 20 of local.py.
This error can also be reproduced by slightly modifying the test/test_websocket_woker.py by searching same term twice, see L57 of updated test.
This is usually because a function (in this case search()) is returning pointers with self.garbage_collect_data==True. This means that when the pointers are deleted (garbage collected) that it sends a delete command to the remote machine.
Have you gotten https://github.com/OpenMined/PySyft/tree/dev/examples/experimental/Federated%20Learning%20Experiment to work on your local setup?
Yes, I can get this example working.
(A side note, perhaps it would be better to have some detail instructions in files to help others running.)
@feigaoxyz can you open a new issue (or issues) pointing to parts of the documentation that are not clear?
Thank you!
Hi @iamtrask
Are you able to reproduce this error from your side?
The simplest way is to replicate the search and asserts again after the first round in this standard test file for websocket worker.
Hi @mari-linhares
Some of my thoughts on the "FL experiment" example as its current state:
FLASK_APP=server.py flask run; orapp.run() in server.py and run python server.pyipynb.I might put a PR when I got some time.