A platform to launch federated learning (FL) training jobs.
To install the project dependencies, first you need to create a virtual environment. The easiest way is by using the virtualenv package:
virtualenv venv
source venv/bin/activate
We use Poetry to manage back-end dependencies:
pip install --upgrade pip poetry
poetry install
We use Yarn to manage front-end dependencies. Install it on MacOS using Homebrew. Also make sure install Node in case you don't have it.
brew install node
brew install yarn
Then install the project dependencies in production mode:
yarn --prod
Redis is used to fetch the metrics reported by servers and clients during their runs.
If you don't have Docker installed, follow these instructions to install it. Then, pull Redis' official docker image (we currently use version 7.2.4):
docker pull redis:7.2.4
MongoDB is used to store information about the training jobs.
If you don't have Docker installed, follow these instructions to install it. Then, pull MongoDB' official docker image (we currently use version 7.0.8):
docker pull mongo:7.0.8
If it's your first time running it, create a container and run it with the command below:
docker run --name mongodb-florist -d -p 27017:27017 mongo:7.0.8
From the second time on, you can just start it:
docker start mongodb-florist
If it's your first time running it, create a container and run it with the command below:
docker run --name redis-florist-server -d -p 6379:6379 redis:7.2.4 redis-server --save 60 1 --loglevel warning
From the second time on, you can just start it:
docker start redis-florist-server
Use Yarn to run both the back-end and front-end on production server mode:
yarn prod
The front-end will be available at http://localhost:3000
. If you want to access
back-end APIs individually, they will be available at https://localhost:8000
.
Upon first access, you will be redirected to the /login
page to enter a password.
The default password is admin
and you will be prompted to change it on first login.
Changing the password to something different than the default is required, all API calls
will fail otherwise.
If it's your first time running it, create a container and run it with the command below:
docker run --name redis-florist-client -d -p 6380:6379 redis:7.2.4 redis-server --save 60 1 --loglevel warning
From the second time on, you can just start it:
docker start redis-florist-client
To start the client back-end service:
python -m uvicorn florist.api.client:app --reload --port 8001
The service will be available at http://localhost:8001
.
Aditionally, in order to have a client fully up and running, you will need to change the
default password to something else. To do so, go to http://localhost:8001/change-password/index.html
and input the new password. The default password is admin
. Changing the password
to something different than the default is required, all API calls will fail otherwise.
After that, the password will need to be shared with the server for authentication.
If you are interested in contributing to the library, please see CONTRIBUTING.MD. This file contains many details around contributing to the code base, including development practices, code checks, tests, and more.