Giter Site home page Giter Site logo

federated-learning-with-flower's Introduction

Simple Federated Learning with Flower

Requirements

flwr>=0.17
torch>=1.10
torchvision>=0.9
PyTDC>=0.3
rdkit-pypi>=2021.9.2.1
scikit-learn>=1.0.1

or you can simply execute: pip install -r requirments.txt

Run (example)

python3 server.py --dataset_name mnist --iid \
-N 100 -K 0.1 -R 500 -B 10 -E 5 \
--test_fraction 0 \
--seed 951023

Configurations

  • --dataset_name: (required) which data to use for federated learning: {MNIST | CIFAR10 | TOX21}
  • -N or --num_clients: total number of clients participating in federated learning
  • -K or --fraction: fraction of participating clients at each round
  • -B or --batch_size: batch size for client-side update/evaluation
  • -E or --num_epochs: number of local epochs required for client-side update
  • -R or --num_rounds: number of total rounds
  • -S or --num_shards: number of resulting shards used for splitting dataset in non-IID setting (valid only if --iid argument is not passed)
  • --iid: wheter to split data in an IID manner; if not used, the dataset is split into pathological non-IID setting propsed in (McMahan et al., 2017)
  • test_fraction: fraction of testset for each client (set to zero if only centralized evluation (i.e. server-side evaluation)) is required)
  • --data_path: path to store dataset
  • --seed: random seed

Datasets

Tox21

Dataset Description:: Tox21 is a data challenge which contains qualitative toxicity measurements for 7,831 compounds on 12 different targets, such as nuclear receptors and stree response pathways.

Task Description: Binary classification. Given a drug SMILES string, predict the toxicity in a specific assay.

Command: sh commands/run_tox.sh

References: Tox21 Challenge.

MNIST

Dataset Description:: The MNIST database of handwritten digits has a training set of 60,000 examples, and a test set of 10,000 examples with the size of 28x28.

Task Description: Multiclass classification. Given a gray-scale handwritten digit image, predict its label (0-9).

Command: sh commands/run_mnist.sh

References: MNIST Database

CIFAR10

Dataset Description:: The CIFAR-10 dataset consists of 60000 32x32 color images in 10 classes, with 6000 images per class. There are 50,000 training images and 10,000 test images.

Command: sh commands/run_cifar.sh

Task Description: Multiclass classification. Given a 3-channel image, predict its label (airplane, automobile, bird, cat, deer, dog, frog, horse, ship, truck).

References: CIFAR-10 Dataset

federated-learning-with-flower's People

Contributors

vaseline555 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 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.