Skip to content

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

Merged
iamtrask merged 9 commits into
OpenMined:masterfrom
mukul-rathi:demos_mukul-rathi
Nov 2, 2018
Merged

[WIP] Add Federated Learning and Differential Privacy demos#1566
iamtrask merged 9 commits into
OpenMined:masterfrom
mukul-rathi:demos_mukul-rathi

Conversation

@mukul-rathi
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
Member

SUPER excited to see this coming together!!!

@mukul-rathi
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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.

3 participants