0

I am trying to follow the instructions of PySyft in order to launch a duet.

My actual problem is that I can not execute the following commands in a .py file

duet.store.pandas
duet.store[key]

Τhis is a demo to reproduce the mistake

Firstly "Data Owner"

import syft as sy 
import torch as th
import time

duet=sy.launch_duet("network_url=http://localhost:5000",loopback=True)
print(duet)
x=th.Tensor([1,2,3]).tag("data")
x_p=x.send(duet,pointable=True)
print(x_p)

with the following output

♫♫♫ > CONNECTED!

<DomainClient: <UID: daf0e0361efa494f860ce451e780f084>>
<syft.proxy.torch.TensorPointer object at 0x000002627F06F790>

and secondly "Data Scientist"

import syft as sy
import torch as th 
import time 

time.sleep(20)
duet=sy.join_duet("network_url=http://localhost:5000",loopback=True)
print(duet)
print("sleep")
time.sleep(30)
if duet is not None:
    print("before exec")
    ptr=duet.store["data"]
    print("its executed")

with the following output


♫♫♫ > CONNECTED!
<Duet: <UID: daf0e0361efa494f860ce451e780f084>>
sleep
before exec

The "its executed" is never printed and the program does not finish its execution.

  • Please post the minimal necessary code to reproduce the problem **here**; see how to create a [mre]. Plus, "*I cannot execute [...] not in a notebook*" is not exactly clear; if you *can* execute in a notebook but fail to do so in a script, please clarify. – desertnaut Jun 16 '21 at 10:34
  • I added a minimal reproducible example , thank you – sofoklisallos Jun 16 '21 at 11:10
  • Have you confirmed that `duet is not None`? What is the result of `print(duet)`? – desertnaut Jun 16 '21 at 11:30
  • When I print(duet) in both sides i get the same UID , so there are connected. Also if I put a print above ptr=duet.store["data"] (inside the if loop) it is executed . – sofoklisallos Jun 16 '21 at 11:51

0 Answers0