Skip to content

kvu228/FlwrBC

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

image

Description 📜

This demo demonstrates a federated learning using Flwr framework with a private Etherum blockchain to classify images in CIFAR-10 dataset.

The project contains the following:

  • The code related to smart contracts is placed under ./Blockchain
  • The code related to server organisation is placed under ./Server
  • The code related to client organisation is placed under ./Client

  • Requirement ⚙️

    To run this project successfully, you need to install the following:

  • Anacoda
  • Set up enviroment by using venv.yml with Anacoda promp conda env create --file venv.yml
  • NodeJS
  • Truffle suite and Ganache UI to simulate the blockchain

  • How to use 🧑‍🏫

    Setup blockchain

    In ./Blockchain, compile the smart contracts by truffle compile.
    After compilation, run the promp truffle migrate --network development to mirgrate the contract on the network.
    Please help check the configuration in truffle-config.js
    Ganache should be opened before running the project

    For IPFS

    Change your keys in api_key.json

    For Server organisation

    1. Change the direction to ./Server
    2. Use uvicorn promp to start a server: uvicorn server_api:server --reload. The server will run default on localhost:8000
    3. Access localhost:8000/docs to interact with the API

    For Client organisation

    1. Change the direction to ./Client
    2. Use uvicorn promp to start a client: uvicorn client_api:app --reload --port PORT_NUMBER. The client will run default on localhost:PORT_NUMBER
    3. Access localhost:PORT_NUMBER/docs to interact with the API

    Demo 📹

    Demo Video

    About

    No description, website, or topics provided.

    Resources

    Stars

    Watchers

    Forks

    Releases

    No releases published

    Packages

    No packages published