drorasaf / FLNotify

Code demonstrating how to integrate security into federated learning

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

FLNotify - Thesis

This code is part of thesis work to establish the FLNotify framework as a keycomponent in future federated learning architectures.

This repository is composed of 4 different components:

  1. infrastructure which contains the code for easily spinning up and down on AWS the required components for FedLess
  2. FLNotify is the package which provides notification for the security
  3. Modified FedLess version to include interaction with FLNotify to allow easy notification to security
  4. Flower based code with interaction to FLNotify, enabling another framework to integrate with this.

Get AWS credentials

Run: pip install awscli aws configure

Installation

  1. Download terraform based on your platform from HashiCorp.
  2. Go to directory cd infrastructure
  3. Get AWS credentials
  4. Run terraform apply

Teardown of infrastructure

  1. Go to Directory cd infrastructure
  2. Get AWS credentials
  3. Run terraform destroy

Deploy FedLess

Assuming installation has already happened, if not, please see Installation

  1. Login to kubectl, run: aws eks update-kubeconfig --region region-code --name my-cluster
  2. Go to Fedless\kubernetes
  3. Go to data-file-store
  4. run kubectl -f deployment.yaml
  5. run kubectl -f service.yaml
  6. Go to parameter-server
  7. create a helm package: helm package parameter-server
  8. deploy helm chart: helm install -f parameter-server/values.yaml parameter-store parameter-server-0.1.0.tgz
  9. deploy openwhisk on the cluster: ??
  10. deploy invoker ??
  11. deploy aggregator: ?

setup clients ??

Get Data

Run:

  1. git clone https://github.com/andreas-grafberger/leaf.git
  2. cd data\femnist
  3. ./preprocess.sh -s niid --sf 0.25 -k 100 -t sample --smplseed 1549786595 --spltseed 1549786796 --nochecksum
  4. cd ../shakespeare
  5. ./preprocess.sh -s niid --sf 1.0 -k 64 -tf 0.9 -t sample --nochecksum

Run an experiment

Go to scripts and run any of the existing experiments

Run an experiment on Flower

TBD

About

Code demonstrating how to integrate security into federated learning


Languages

Language:Python 82.5%Language:HCL 16.5%Language:Dockerfile 1.0%