-
-
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
FL MNIST example with autograd tracing #3567
Conversation
Check out this pull request on Review Jupyter notebook visual diffs & provide feedback on notebooks. Powered by ReviewNB |
Codecov Report
@@ Coverage Diff @@
## master #3567 +/- ##
==========================================
- Coverage 94.76% 94.65% -0.12%
==========================================
Files 159 160 +1
Lines 17269 17294 +25
==========================================
+ Hits 16365 16369 +4
- Misses 904 925 +21
|
@@ -181,3 +181,103 @@ def autograd_test(X): | |||
|
|||
# Test all results are equal | |||
assert torch_grads.eq(ts_plan_grads).all() | |||
|
|||
|
|||
def test_fl_mnist_example_training_can_be_translated(hook, workers): |
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.
Outstanding!!!
@@ -100,7 +120,7 @@ def __init__(self, self_, other): | |||
self.other = other | |||
|
|||
def gradient(self, grad): | |||
assert isinstance(self.other, int) | |||
# assert isinstance(self.other, int) |
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.
No longer needed or worth keeping?
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 div code was made for ints, but it seems to works fine for tensor (with scalar value at least).
@LaRiffle do you see any problem with removing this assert?
Description
Attempt to use autograd tracing (in its existing form) to trace MNIST example for static FL.
Initially, there's unit test that should pass.
Next, notebooks should be updated.
Checklist:
(See the the contribution guidelines for additional tips.)