Giter Club home page Giter Club logo

chainsfl-implementation's Introduction

ChainsFL

Implementation of ChainsFL.

Requirments

Attention: The configs of Fabric in ./commonComponent/interRun.sh should be modified to access the Fabric deployed above. Besides, this file should be authorized with the right of writer/read/run.

Deployment of DAG

The DAG could be deployed on a personal computer or the cloud server.

Copy all the files of this repository to the PC or cloud server, and then run following commands in the root path of this repository.

cd dagMainChain
python serverRun.py

Run one shard

The shard also could be deployed on a personal computer or the cloud server.

Copy all the files of this repository to the deployment location, and modify line 466 of dagMainChain/clientRun.py for the real address of the DAG server deployed above. Then run following commands in the root path of this repository.

# run the DAG client
cd dagMainChain
python clientRun.py --epochs 1 --frac 0.1 --gpu -1 --model cnn --num_channels 1

# run the FL task
cd federatedLearning
python main_fed_local.py --epochs 1 --frac 0.1 --gpu -1 --model cnn --num_channels 1

The details of these parameters could be found in file federatedLearning/utils/options.py. It should be noted that the --epochs configured in command with clientRun.py represents the number of rounds run in each shard. And the --epochs configured in command with main_fed_local.py represents the number of epochs run on each local device.

Run multiple shards

Similar to the above, copy all the files of this repository and then modify the files and execute the commands presented above.

Besides, the para of nodeNum in line 58 of dagMainChain/clientRun.py indicates the shard index which should be modified.

Acknowledgments

Acknowledgments give to shaoxiongji and AshwinRJ for the basic codes of the FL module.

chainsfl-implementation's People

Contributors

shuoyuan avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.