Failed to serialize the context when setting the params like this, see the code below.
How to Reproduce
import tenseal as ts
ctx = ts.context(ts.SCHEME_TYPE.CKKS,
poly_modulus_degree=32768,
coeff_mod_bit_sizes=[35]+[27]*15+[35])
ctx.global_scale = pow(2, 27)
ctx.generate_galois_keys()
ctx.make_context_public()
s = ctx.serialize()
Screenshots
macOS
[libprotobuf ERROR /Users/xxf/code/TenSEAL/build/temp.macosx-11.1-arm64-cpython-38/_deps/protocolbuffers_protobuf-src/src/google/protobuf/message_lite.cc:487] tenseal.TenSEALContextProto exceeded maximum protobuf size of 2GB: 2240338979
Traceback (most recent call last):
File "test.py", line 10, in <module>
s = ctx.serialize()
File "/Users/xxf/miniconda3/envs/ph/lib/python3.8/site-packages/tenseal/enc_context.py", line 189, in serialize
return self.data.serialize(
ValueError: failed to save proto
Ubuntu
[libprotobuf ERROR /__w/TenSEAL/TenSEAL/build/temp.linux-x86_64-cpython-38/_deps/protocolbuffers_protobuf-src/src/google/protobuf/message_lite.cc:487] tenseal.TenSEALContextProto exceeded maximum protobuf size of 2GB: 2240318631
Traceback (most recent call last):
File "test.py", line 10, in <module>
s = ctx.serialize()
File "/home/xxf/miniconda3/envs/ph/lib/python3.8/site-packages/tenseal/enc_context.py", line 189, in serialize
return self.data.serialize(
ValueError: failed to save proto
System Information
OS: macOS & Linux
OS Version: Ventura 13.4.1 & Ubuntu 20.04
Language Version: Python 3.8
Package Manager Version: Conda 3.4.3
Additional Context
To increase the multiplication depth, the param coeff_mod_bit_sizes is set like this.
Description
Failed to serialize the context when setting the params like this, see the code below.
How to Reproduce
Screenshots
macOS
Ubuntu
System Information
Additional Context
To increase the multiplication depth, the param
coeff_mod_bit_sizes
is set like this.