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

simulation code - step1, data distribution #6

Closed
martinjaggi opened this issue Jul 9, 2020 · 6 comments
Closed

simulation code - step1, data distribution #6

martinjaggi opened this issue Jul 9, 2020 · 6 comments
Labels
good first issue Good for newcomers

Comments

@martinjaggi
Copy link
Member

provide a simulated decentralized code (not using any p2p backend, but instead just running locally), which holds a communication graph, and distributes a standard/toy ML dataset among the nodes.

data distribution should support both random and heterogeneous / non-iid (for example different labels for each node).

we can use standard PyTorch code examples e.g. MNIST or Cifar

@martinjaggi martinjaggi added the good first issue Good for newcomers label Jul 9, 2020
@martinjaggi martinjaggi added this to the v1.0 p2p dummy prototype, plus simulator milestone Jul 9, 2020
@Saipraneet
Copy link
Member

We can base this code off of this federated learning simulation codebase: https://github.com/AshwinRJ/Federated-Learning-PyTorch

The main training loop occurs here and it just uses nested foor loops: https://github.com/AshwinRJ/Federated-Learning-PyTorch/blob/master/src/federated_main.py

Reach out if you're interested in working on this: there are some gotchas with this codebase (bugs etc.)

@martinjaggi
Copy link
Member Author

cool, this looks nice and compact. probably easy to run in colab too?

@Saipraneet
Copy link
Member

Saipraneet commented Aug 14, 2020

Yep...I can also extract out the federated learning code into a single colab from the personalization project with Mahmoud. It should serve as a useful starting point.

@Saipraneet
Copy link
Member

A super simple colab code for decentralized training with a CNN on MNIST data.
https://colab.research.google.com/drive/1DT4EaeEk9AuaFWMRaNkFEyQ9e-SphlUG?usp=sharing

Currently the code tests on the average model across the clients. This should probably be changed.

@martinjaggi
Copy link
Member Author

just pinging @ThomasDCepfl here as he's working on it (based on the above excellent colab code by praneeth). he will keep us updated later...

@Saipraneet
Copy link
Member

Committed the notebook: 1e208c4

Please feel free to re-open issue/unroll commit.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants