-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[POC] Secure channel abstraction #11
base: trusted-aggr-stash
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
let's discuss in person, I have some further comments on finding the right abstraction for channels. I'd like to also go over how this might eventually be exposed to the user (taking some pointers from Morten's earlier recommendations)
also note I have not verified the encrypt/decrypt work just yet -- I made sure that the key generation was happening in such a way not to leak secret keys, but otherwise am assuming there haven't been too many significant changes to that. should be worth another look during next round of feedback.
tensorflow_federated/python/core/impl/executors/federating_executor.py
Outdated
Show resolved
Hide resolved
@@ -492,128 +492,38 @@ def validate_executor_placements(cls, executor_placements): | |||
'Unsupported cardinality for placement "{}": {}.'.format( | |||
pl, pl_cardinality)) | |||
|
|||
async def _trusted_aggregator_generate_keys(self): | |||
@classmethod | |||
async def _move(cls, arg, target_executor, parent_executor, channel): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was thinking that the signature could be _move(self, arg, source_placement, target_placement)
or similar. channel
should be referencable from self
(the Strategy)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
good point, that would make more sense.
tensorflow_federated/python/core/impl/executors/federating_executor.py
Outdated
Show resolved
Hide resolved
tensorflow_federated/python/core/impl/executors/federating_executor.py
Outdated
Show resolved
Hide resolved
tensorflow_federated/python/core/impl/executors/federating_executor.py
Outdated
Show resolved
Hide resolved
tensorflow_federated/python/core/impl/executors/federating_executor.py
Outdated
Show resolved
Hide resolved
tensorflow_federated/python/core/impl/executors/federating_executor.py
Outdated
Show resolved
Hide resolved
tensorflow_federated/python/core/impl/executors/federating_executor.py
Outdated
Show resolved
Hide resolved
Hey @mortendahl @jvmncs , Quick status on this. I have made good progress but it's not completely done. I still want to add more tests, review the code again, potentially add Thank you! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hi @yanndupis, I've added a few comments; perhaps it makes sense to do a quick design sync
tensorflow_federated/python/core/impl/executors/base_channel.py
Outdated
Show resolved
Hide resolved
tensorflow_federated/python/core/impl/executors/base_channel.py
Outdated
Show resolved
Hide resolved
pass | ||
|
||
@abc.abstractmethod | ||
async def receive(self, value, sender_index=None, receiver_index=None): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what is value
here? how does it relate to the return value of receive
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
value is list of EagerValues
and it was returning a FederatingExecutorValue
. I changed it to return a list of EagerValues
.
I have the same pb with _encrypt_values_on_sender
. However not sure yet, how to keep this Federatedtype check (if needed) if I return a list of EagerValues after encryption.
tensorflow_federated/python/core/impl/executors/federating_executor.py
Outdated
Show resolved
Hide resolved
tensorflow_federated/python/core/impl/executors/federating_executor.py
Outdated
Show resolved
Hide resolved
tensorflow_federated/python/core/impl/executors/federating_executor.py
Outdated
Show resolved
Hide resolved
tensorflow_federated/python/core/impl/executors/federating_executor.py
Outdated
Show resolved
Hide resolved
tensorflow_federated/python/core/impl/executors/federating_executor.py
Outdated
Show resolved
Hide resolved
tensorflow_federated/python/core/impl/executors/federating_executor.py
Outdated
Show resolved
Hide resolved
Hey @mortendahl , thanks for you! sounds good let's do a quick design sync. |
Hey guys, First of all, thank you for the review! I have addressed most of the comment (still have 2-4 for tomorrow). However, I still have a Channel object per pair of placements. I need to investigate more tomorrow. But it seems we could have a channel per pair of executors. If that's possible, that could simplify the code. For each channel, each executor would have their key pair. Potentially I wouldn't need to use I just don't know yet how to structure ChannelGrid and if i am missing potential complications. Thank you! |
Hey guys, I clean up a bit more, added specific tests to test Channel functionalities etc. I have started to move the code to the I will continue to work on this on Monday. Regarding having Channel per pair of placements vs per pair of executors, after chatting with Jason, we decided to keep per pair of placements in this branch. Still open to discussion if we want to take the other approach but we can do this in the tff-aggregations branch. thank you! |
Hey @mortendahl @jvmncs ,
Here is an initial draft with the new abstraction for the secure channel. Let me know if it's moving to the right direction.
Thank you!