-
-
Notifications
You must be signed in to change notification settings - Fork 156
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
add serialization support in tensors #109
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.
Trying this locally and it's really exciting! Can't wait to try a client/server scenario!
@@ -1,12 +1,40 @@ | |||
import tenseal as ts |
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.
Nice spot for the filename lol
…nsor_serialization
…enSEAL into tensor_serialization
This is really great work, it will allow us to build and try client/server scenarios easily. |
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.
The PR is looking amazing!
I just left a quick remark about the Python API for creating tensors, and I'm also wondering about pickling: I see that it's still serializing the context, right? I don't won't to bother you with that on this PR but I think we can track a new issue about optimizing this that can be summarized in the following points:
- When pickling, serialize the vector only
- When unpickling, deserialize the vector only, setting its context to nullptr
- Add a method for linking vectors with a context
- Vectors shouldn't be operational while not linked to a context
- The vector shouldn't be operational after unpickling until it has been linked to a context
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.
Well done Bogdan! Just wrapped raised errors in a TypeError
Co-authored-by: Ayoub Benaissa <ayouben9@gmail.com>
Co-authored-by: Ayoub Benaissa <ayouben9@gmail.com>
Co-authored-by: Ayoub Benaissa <ayouben9@gmail.com>
Co-authored-by: Ayoub Benaissa <ayouben9@gmail.com>
Co-authored-by: Ayoub Benaissa <ayouben9@gmail.com>
* add serialization support in tensors * add python support * add gtests * tensor serialization tests * Update tenseal/tensors/__init__.py Co-authored-by: Ayoub Benaissa <ayouben9@gmail.com> Co-authored-by: Bilal Retiat <bilalphilomath@gmail.com>
Description
Protobuff support for tensors
fixes #72
Checklist