Skip to content
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

[WIP] Add Federated Learning and Differential Privacy demos #1566

Merged
merged 9 commits into from Nov 2, 2018

Conversation

mukul-rathi
Copy link
Contributor

@mukul-rathi mukul-rathi commented Sep 26, 2018

Description

Adding demos combining Differential Privacy and Federated Learning

Fixes #1556

Type of change

  • New feature (non-breaking change which adds functionality)
  • This change requires a documentation update

How Has This Been Tested?

Not yet (WIP)

  • Test A
  • Test B

Test Configuration:

  • CPU:
  • GPU:
  • PySyft Version:
  • Unity Version:
  • OpenMined Unity App Version:

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules

@mukul-rathi
Copy link
Contributor Author

This is the WIP PR - so far I've taken the code from the Boston Housing Dataset Federated learning and Differential Privacy demos and put them into a single IPython Notebook. There is still some code that needs to be combined in the train method.

@mukul-rathi mukul-rathi changed the title Add Initial Fed/Diff Boston Demo Add Federated Learning and Differential Privacy demos Sep 26, 2018
@mukul-rathi mukul-rathi changed the title Add Federated Learning and Differential Privacy demos [WIP] Add Federated Learning and Differential Privacy demos Sep 26, 2018
@iamtrask
Copy link
Member

SUPER excited to see this coming together!!!

@mukul-rathi
Copy link
Contributor Author

mukul-rathi commented Oct 8, 2018

I think there may be a bug in model.send(worker)? Since there is a key error in workers._objects() when I run the forward prop step pred=model(data).

However, when I send the parameters of the model individually using param.send(worker) their ids are stored in workers._objects().keys() correctly so there is no key error in workers._objects() when I run the forward prop.

There is a key error in workers._objects() when the program then calls optimizer.zero_grad() on the same worker when the next lot is iterated through. Is there a corresponding optimizer.send() operation that I should be sending the worker?

@iamtrask
Copy link
Member

Hey @mukul-rathi - try master now. i think there might have been a bug in model.send() for a minute.

@mukul-rathi
Copy link
Contributor Author

@iamtrask thanks a lot! The notebook works now - can you look over it?
I'll get on with the second notebook now!

@iamtrask
Copy link
Member

iamtrask commented Nov 2, 2018

Excellent work! Merging your first notebook now! (we can merged the second later) :)

@iamtrask iamtrask merged commit 2c7218a into OpenMined:master Nov 2, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants