Skip to content

Participant in Federated Learning scheme that aggregates the updates from the remote trainers and calculates each trainer's contribution to the model training.

License

Notifications You must be signed in to change notification settings

DeltaML/federated-aggregator

Repository files navigation

Federated learning - Federated Aggregator

Build Status Coverage Status

Repository that contains a Proof of Concept for the implementation of a Federated Learning framework.

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Prerequisites

Installing

A step by step series that tell you how to get a development env running

git clone [email protected]:DeltaML/federated_aggregator.git
cd federated_aggregator/
python3 -m venv venv
source venv/bin/activate
pip install -r requirements.txt

Run

Using command line

    gunicorn -b "0.0.0.0:8080" --chdir federated_aggregator/ wsgi:app --preload

Using Docker

    docker build -t federated_aggregator --rm -f federated_aggregator/Dockerfile
    docker run --rm -it -p 8080:8080 federated_aggregator

Using Pycharm

Script Path: .../federated_aggregator/virtualenv/bin/gunicorn
Parameters: -b "0.0.0.0:8080" wsgi:app --preload
Working directory: ../federated_aggregator

Usage

Register new data owner

curl -v -H "Content-Type: application/json" -X POST "http://localhost:8080/dataowner"

Get data owners registered

curl -v -H "Content-Type: application/json" -X GET "http://localhost:8080/dataowner"

Train model

curl -v -H "Content-Type: application/json" -X POST -d '{"type": "LINEAR_REGRESSION", "call_back_endpoint": "URL_MODEL_BUYER", "call_back_port": 9090,"public_key": "XXXXXXXXXXXXXXXX"}' "http://localhost:8080/model"

Configuration

ACTIVE_ENCRYPTION = False
N_ITER = 100 # El numero de iteraciones aceptables utilizando PheEncryption por ahora es 4
DATA_OWNER_PORT = 5000

Configuration details

  • ACTIVE_ENCRYPTION: TODO
  • N_ITER: TODO
  • DATA_OWNER_PORT: TODO

Versioning

We use SemVer for versioning. For the versions available, see the tags on this repository.

Authors

See also the list of contributors who participated in this project.

License

This project is licensed under the MIT License - see the LICENSE.md file for details

About

Participant in Federated Learning scheme that aggregates the updates from the remote trainers and calculates each trainer's contribution to the model training.

Resources

License

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages