OpenMined / SyMPC

A SMPC companion library for Syft
MIT License
96 stars 39 forks source link

The error of example of remote MPC? #282

Open jiyanxin opened 3 years ago

jiyanxin commented 3 years ago

I want to run a remote example of MPC, but when I run the PySyft/packages/syft/examples/secure-multi-party-computation/Duet/1-DS-1-DO, there's a bug "The session *** could not be found". I also run some local example of MPC, but I don't kown how to write a remote example according to local example. I want to get a help of remote example. Now, I have two choices, one is that if I want to run remote example 1-DS-1-DO without bugs, which version of syft and sympc I should install ? the other is that how to write a remote example according to local example without bugs , anyone can give help? thanks!!!

aanurraj commented 3 years ago

Hi @jiyanxin thanks for the report, I will look into it and will update you.

kajaschmidt commented 3 years ago

Hi @aanurraj, I have the same issue regarding the The session *** could not be found error when running SyMPC via a Duet Server. If I run the cell a second time, I end up in a (what seems to be an infinite loop) of a runtime error (with the The session *** could not be found, followed by thecannot enter context: <Context object at ***> is already entered error).

eragon-saphira commented 3 years ago

Hi @aanurraj , For the session could not be found issue, the reason seems to be that the DO session IDs are not stored in CURRENT_SESSION in .session, but the proto2object in PySyft for share_tensor seems to be checking it by get_session() which blocks. Furthermore, the Context already entered error seems to be occuring in parallel_execution for reconstruct which does a send_immediate_msg_with_reply and crashes