After creating a private tensor, I get a SendNotPermittedError when trying to send the data to the node if only one user is listed in allowed_users.
private_dataset = th.tensor([1, 3.5, 47.3]).private_tensor(allowed_users = ("Alice"))
private_dataset = private_dataset.tag('#my_data')
data_pointer = private_dataset.send(site, user='Alice')
Possibility to define only one allowed user.
To overcome this issue I am currently listing the same user twice. For instance, allowed_users = ("Alice", "Alice")
Thank you for reporting this :+1:
I will take this one.
:raised_hands:
actually this not a bug, private tensor expects a list of users, private_tensor(allowed_users = ("Alice")) and here you are passing a string basically which converts to 5 users ['A', 'l' ....],
either pass a list or tuple. for tuple with single element you need to use this format ("Alice",) , ("Alice") this is just a string
private_tensor(allowed_users = ("Alice",)) this will work
or better private_tensor(allowed_users = ["Alice"])
Thank you for looking into this. I think we can close it!
@gmuraru should i add a method to convert string to list explicitly?
so you can pass a string also, and passing string for single user looks better
Nope, I think it is fine because the parameter name allowed_users allude to a list/tuple of user names
cool np