openfheorg / openfhe-python

Official Python wrapper for OpenFHE. Current release is v0.8.8 (released on June 25, 2024).
https://openfheorg.github.io/openfhe-python/html/index.html
BSD 2-Clause "Simplified" License
60 stars 18 forks source link

Add Serialize/Deserialize functions #151

Closed Thadah closed 3 days ago

Thadah commented 1 week ago

Closes #145

Adds openfhe.Serialize() and deserialization for every object so it can do it directly into a variable rather than writing a file that has to be read afterwards. I've tested both and they're working well.

I'd have liked to use other names rather than ...String for the deserialization part. It would have made more sense to change the other function names to something like ...ToFile but since that would break a lot of existing code I'll keep it like this, unless there is a suggestion for a better name.

If you see any issue with the code or you believe it makes more sense in another file, please let me know.

erik-3milabs commented 1 week ago

@Thadah Added tests and some missing headers https://github.com/Thadah/openfhe-python/pull/1

Thadah commented 4 days ago

Hi! Sorry for bothering, I just wanted to follow up on this PR. I haven't closed the testing conversation because depending on how the functions might change on what's decided, the tests will have to follow. If there are any changes or clarifications needed from my end, please let me know!

erik-3milabs commented 4 days ago

I'm awaiting input from @yspolyakov on this too. The issue (#145) underlying this PR is added to the 0.8.9 milestone, so I'm confident that somebody will get back to us at some point.

yspolyakov commented 3 days ago

Hi @Thadah I've added you directly to the repo (please accept the invitation). Could you create a branch in this repo (this will allow us to run the CI against it) and resubmit this PR (set dev instead of main as the target)? Thank you for your contribution. Sorry for the delay (it was due to the v1.2 release of OpenFHE).

Thadah commented 3 days ago

Hello @yspolyakov certainly! I've uploaded the branch and created a new PR in #155

yspolyakov commented 3 days ago

Superseded by #155