-
-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Fix issues in handle_func_command in syft tensors #3807
Conversation
Q: Could you add a test for this? |
Codecov Report
@@ Coverage Diff @@
## master #3807 +/- ##
========================================
Coverage 94.69% 94.70%
========================================
Files 187 187
Lines 18626 18961 +335
========================================
+ Hits 17638 17957 +319
- Misses 988 1004 +16
|
I've updated the code once more maybe it's clearer now. It's hard to add tests for this, but it's needed for batchnorm that I wanted to put in a separate PR and which is tested. Sounds good? |
@@ -356,7 +372,7 @@ def handle_func_command(cls, command): | |||
# Check that the function has not been overwritten |
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.
PICKY Stuff: Here the comment should be removed, right? Since we look for native_{cmd}
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.
haha no it's good to be picky. here the module native_torch
defined in native.py overwrites native torch functions... Yeah it's a bit strange, I really had to modify a torch function (aka torch.roll) to behave slightly differently
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! Only one small question
* Fix issues in handle_func_command in syft tensors * Fix handle_func_cmd in native
Description
This cleans code in handle_func_command and fix bugs due to variable overwriting for syft tensors, and to overloading functions in native.py