-
Notifications
You must be signed in to change notification settings - Fork 154
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
feat: expose statuses to compile torch #261
feat: expose statuses to compile torch #261
Conversation
137570e
to
02d8c10
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.
thanks for this ! I have a few comments
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.
This could be needed indeed thanks!
@@ -577,6 +577,7 @@ def compile( | |||
p_error: Optional[float] = None, | |||
global_p_error: Optional[float] = None, | |||
verbose: bool = False, | |||
statuses: Optional[Dict[str, str]] = 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.
I don't feel like statuses is very talkative. Should be referring to the input I think. input_statuses
or input_encryption
where the user passes booleans in a list following the order of the input in the forward call? so that you don't have to specify onnx node names.
1b48bff
to
782f399
Compare
Looks like KNN test is flaky |
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.
Looks great thanks!
What I did:
|
@@ -598,9 +599,15 @@ def compile( | |||
error to a default value. | |||
verbose (bool): Indicate if compilation information should be printed | |||
during compilation. Default to False. | |||
inputs_encryption_status (Optional[Sequence[str]]): encryption status ('clear', |
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 would still mention that everything is encrypted if the parameter is set to 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.
It's mentionned in all the user facing APIs, I don't think many users will use this one tbh
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 mean it was mostly for making the docstring consistent with what this parameters does, as we now provide a way to chose what inputs to encrypt, to avoid confusion that we don't chose which ones are encrypted or not based on whatever other rules. But sure if no one else pushes for this then go for it
@@ -142,6 +143,8 @@ def _compile_torch_or_onnx_model( | |||
global_p_error (Optional[float]): probability of error of the full circuit. In FHE | |||
simulation `global_p_error` is set to 0 | |||
verbose (bool): whether to show compilation information | |||
inputs_encryption_status (Optional[Sequence[str]]): encryption status ('clear', 'encrypted') |
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.
same
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.
Same what? There is a comment on the fact that by default everything is encrypted
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.
same as in "same comment as above" in order to not avoid making changes in both places if there are some
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 still have a few comments
782f399
to
f962849
Compare
Adressed the feedback made by @RomanBredehoft |
KNN flaky, relaunching |
f962849
to
8346a08
Compare
|
||
Returns: | ||
Circuit: The compiled Circuit. | ||
|
||
Raises: | ||
ValueError: if inputs_encryption_status does not match with the |
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.
it's a bit more than that right ?
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 it's if the configuration is wrong, how would you formulate it?
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 would usually very quickly describe what are bad configurations
Coverage passed ✅Coverage details
|
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.
if no one pushes for these last comments, fine for me, thanks a lot for this feature !
No description provided.