-
Notifications
You must be signed in to change notification settings - Fork 152
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
chore: add load tfhers params from dict #1196
base: main
Are you sure you want to change the base?
Conversation
fa8e17a
to
892b6d9
Compare
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.
LGTM for the API, but I don't think we should update the example.
PARAMS_DICT = { | ||
"lwe_dimension": 902, | ||
"glwe_dimension": 1, | ||
"polynomial_size": 4096, | ||
"lwe_noise_distribution": {"Gaussian": {"std": 1.0994794733558207e-6, "mean": 0.0}}, | ||
"glwe_noise_distribution": {"Gaussian": {"std": 2.168404344971009e-19, "mean": 0.0}}, | ||
"pbs_base_log": 15, | ||
"pbs_level": 2, | ||
"ks_base_log": 3, | ||
"ks_level": 6, | ||
"message_modulus": 4, | ||
"carry_modulus": 8, | ||
"max_noise_level": 10, | ||
"log2_p_fail": -64.084, | ||
"ciphertext_modulus": {"modulus": 0, "scalar_bits": 64}, | ||
"encryption_key_choice": "Big", | ||
} | ||
|
||
tfhers_type = tfhers.get_type_from_params_dict( | ||
PARAMS_DICT, |
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.
We shouldn't update the example. There are explained steps to generate the file with TFHE-rs parameters in Rust. The motivation for that was to remove parameters completely from the Python file, but this is re-introducing them.
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.
ok, makes sense
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.
LGTM! You can just green the CI and merge. It is failing for two reasons currently:
- commit message compliance: second commit is not compliant, but I guess you could squash it locally and force-push
- API has changed, so docs need to be updated: you can either run the docgen locally, but this might become a nightmare depending on what you use locally. Or you can just apply the patch provided in the logs.
Thanks @andrei-stoian-zama
No description provided.