Skip to content

Latest commit

 

History

History
47 lines (40 loc) · 1.65 KB

README.md

File metadata and controls

47 lines (40 loc) · 1.65 KB

Federated Learning

Federated learning with model weights aggregation, with updated aggregation, functions able to collaborate with split learning service.

Environment Setup

1.Install flower

python -m pip install flwr 

2.Install Pytorch

python -m pip install torch torchvision

Run Federated Learning

cd path/to/this/folder

Start the server first.

python server.py

Then open a new terminal to start the first client.

cd path/to/this/folder
python client.py

Repeat the previous step in the third terminal to start the second client. Normal simulation requires at least two clients, you can add as many clients as you want.

You can configure the server using following command line arguments:

argument description
-r <rounds> Number of rounds for the federated training. Defaults to 3.
-fc <fit clients> Min fit clients, min number of clients to be sampled next round. Defaults to 2.
-ac <available clients> Min available clients, min number of clients that need to connect to the server before training round can start. Defaults to 2.
-ckpt <checkpoint> Path to checkpoint to be loaded. Defaults to "".
-addr <address> Server address. Defaults to "0.0.0.0:8080".

Implemented Features

  • Federated learning + Pytroch.
  • Load checkpoint on server side.
  • Save checkpoint on client side.
  • Save checkpoint on server side.
  • Load checkpoint on client side.
  • Rewrite Aggregation func for split learning.