Skip to content

What is a good use for the second argument of the PYU constructor? #243

Answered by zhouaihui
Krout0n asked this question in Q&A
Discussion options

You must be logged in to vote

Hi, @Krout0n , this is really a good question!

PYU takes party as the first arg and node as second arg in construction. And node defaults to empty by now.

node is designed to identify two different PYUs of the same party.
The __str__ and __repr__ of PYU is party_node , while __eq__ and __hash__ of PYU are based on str(PYU). So we can tell the difference of two PYUs of the same party, e.g., one PYU is tagged with node 1 and the other PYU is tagged with node 2.

As you can see, the built-in algorithms of SecretFlow haven't encountered a situation where two PYUs with same party were built.
The main reason is the computing of one party occurs in one PYU by now. Maybe node will be used when com…

Replies: 1 comment 5 replies

Comment options

You must be logged in to vote
5 replies
@Krout0n
Comment options

@6fj
Comment options

6fj Jan 5, 2023
Maintainer

@6fj
Comment options

6fj Jan 5, 2023
Maintainer

@Krout0n
Comment options

@6fj
Comment options

6fj Jan 6, 2023
Maintainer

Answer selected by Krout0n
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants