Federated Learning Manager
The py-fl-manager project provides easy integration with NVFlare.
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!
Metadata
Release files for fl-manager 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| fl_manager-0.1.1-py3-none-any.whl | Python 3 | none | any | Details for fl_manager-0.1.1-py3-none-any.whl |
Release files / fl_manager-0.1.1-py3-none-any.whl
| Download URL | fl_manager-0.1.1-py3-none-any.whl |
|---|---|
| Size | 12.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
adffb52354761ab96e8f4c1bce2309f4e999b094b8bad4c784c5a76a3246a517
|
|
BLAKE2b-256 checksum How to use checksums |
05d293cb307bcecac664acfe2968f580770cec254481d3fa1ceb90e7dafd599a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.8.3
|
Security for fl-manager 0.1.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.