fl-manager meta-package
Project description
Federated Learning Manager
The py-fl-manager project provides easy integration with NVFlare.
[!WARNING] This project is currently in alpha.
[!NOTE] The documentation is in progress. Some sections may be incomplete, outdated, or missing details.
Running (example)
The base docker image used is
fl-manager:dev, somake dev/buildshould be executed first.
See available examples at examples. Currently, only nvflare_mnist is available.
Access the example folder. There is a project.yml with the FL project configuration and a set of folders with jobs examples.
- Start by provisioning the workspace with
nvflare provision.
- For now, (04/02/2025):
- Copy and paste the job's folders inside
transferfrom the admin folder. - Change the
PYTHON_EXECUTABLEvariable inside the.env. - Change
fed_admin.jsonoverseer endpoint from 'server1' to 'localhost'.
- Copy and paste the job's folders inside
- Run
docker compose buildanddocker compose upto initialize the simulation workspace. - Login into the admin CLI (
startup.sh) script. - Submit job!
For (1), the following command can be run to achieve it: EXAMPLE=nvflare_mnist make dev/provision.
Code Quality
This repository provides a configuration for SonarScanner. Some missing parameters that should be set before running are the following:
sonar.projectKey=${PROJECT_KEY}
sonar.projectName=${PROJECT_NAME}
sonar.token=${SONAR_TOKEN}
A self-hosted SonarQube can be deployed to perform a local analysis.
- Deploy
SonarQubewithdocker run --name sonarqube-custom -p 9000:9000 sonarqube:community. - Access
SonarQubeand configure a project (default credentials admin:admin). - Create a Project and copy the token.
- Execute tests with coverage using
make dev/test-cov. - Change in
coverage.xmlthe<source>/opt/project/fl_manager</source>root to<source>/usr/src/fl_manager</source>, this enables the coverage support in this local scan. - Fill the properties file with the missing values.
- Run
docker run --rm --network host -e SONAR_HOST_URL="http://localhost:9000" -v $(pwd):/usr/src sonarsource/sonar-scanner-cli
Versioning
All packages follow semantic versioning. This means, all versions with the same major must be compatible between them. This way, packages can evolve independently between them. When a major release needs to be done, all packages must be bumped to the new major.
Contributing
Creating a new package
- Execute
make uv_runtime/run. - Create the necessary folders if they do not exist.
- Run
uv init --no-readme --no-pin-python --lib --name $NAME $PATH. - Mark
srcas source root. Create subfolders for namespace. - Add build target (in new package
.toml) to the namespace package.
Configuration
We use pre-commit hooks.
Setup pre-commit hooks
Probably there will be other methods to install pre-commit we use the following steps:
- Install
pipxwith (system's)pip(i.e.pip install pipx). - Install
pre-commitwithpipx(i.e.pipx install pre-commit). - Follow the instructions that are printed after the execution of the step 2 command, to ensure that
pre-commitis in the path. - Run
pre-commit install.
Check .pre-commit-config.yaml to check what hooks are installed!
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file fl_manager-0.1.1-py3-none-any.whl.
File metadata
- Download URL: fl_manager-0.1.1-py3-none-any.whl
- Upload date:
- Size: 12.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.8.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
adffb52354761ab96e8f4c1bce2309f4e999b094b8bad4c784c5a76a3246a517
|
|
| MD5 |
5c812870c803e716451359be020142ce
|
|
| BLAKE2b-256 |
05d293cb307bcecac664acfe2968f580770cec254481d3fa1ceb90e7dafd599a
|