Giter Site home page Giter Site logo

nxhoang562 / customized-fedml Goto Github PK

View Code? Open in Web Editor NEW

This project forked from dann20/customized-fedml

0.0 0.0 0.0 94.18 MB

This is a fork of FedML framework with additional models

Shell 0.31% Python 83.91% CSS 0.12% HTML 0.07% Jupyter Notebook 15.59%

customized-fedml's Introduction

customized-FedML

This is a fork of FedML framework with additional models

How to use LockEdge and VAE-LSTM in this customized FedML framework

0. Prerequisites

Install and Configure EMQX broker

from repo emqx

  • If pre-built binary packages aren't available for your OS, build from source is recommended (requires erlang and some other packages)
Configuration:
  • In emqx.conf:
    • Set mqtt.max_packet_size = 20MB
    • Set mqtt.retain_available = true
  • In plugins/emqx_retainer.conf:
    • Set retainer.max_payload_size = 20MB

Install required python packages

Install in anaconda on server (recommended) and Raspberry Pi's machine env or virtual env (no conda due to unavailable tensorflow package on armv7l repo)

1. Configuration

Clients and Server

  • In FedML/fedml_iot/cfg.py:
    • Modify HOST variable to your MQTT broker's IP address in your network
    • Modify APP_HOST variable to your server's IP address (Weight Aggregator)
  • Make sure all clients and server are on the same network

Clients

  • In run.sh:
    • Modify server_ip to server's IP address,
    • Modify client_uuid from 0 for each client
    • Change run script for your model (VAE_LSTM_fedavg_rpi_client.py or lockedge_fedavg_rpi_client.py)

Server

  • Modify model configuration json file (for VAE-LSTM) to your needs

2. Run

Instructions are written in chronological order of executions

On Server

  • Run EMQ X broker:
    • cd to bin folder (if built from source)
    • ./emqx start (built from source) or emqx start (binary package)
  • Run Aggregator Server:
    • Activate your installed environment
    • VAE-LSTM Model:
      python VAE-LSTM-app.py --config $(dir to model config file) --num-client $(number of workers)
    • LockEdge Model:
      python LCHA-app.py --client-num-per-round $(number of workers) --comm-round $(number of comm rounds)

On clients:

After server has run, execute ./run.sh

3. Restart

Before re-run scripts on server and clients, restart EMQ X broker by ./emqx restart or emqx restart

customized-fedml's People

Contributors

dann20 avatar dependabot[bot] 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.