Secure Federated Learning Platform
Project description
FeatureCloud
FeatureCloud provides a privacy-preserving platform for federated learning and data analysis. Two major target groups who can benefit from FeatureCloud are researchers and developers. Any end-user who has data and wants to join others in a federated collaboration can use FeatureCloud without worrying about privacy concerns. Moreover, developers can quickly implement a federated app and publish it in the FeatureCloud App Store. Using the FeatureCloud engine, developers can extend states to introduce new ones. For more information on FeatureCloud app development, please visit our GitHub repository. To register and test your apps or to use apps published by others, please visit FeatureCloud.ai. For more information about FeatureCloud architecture, please refer to The FeatureCloud AI Store for Federated Learning in Biomedicine and Beyond [1].
Install FeatureCloud
pip install featurecloud
api
FC api includes the necessary implementation to create an app, run, and manage the controller. It also includes the CLI to support command-line management of the controller.
cli
A CLI for FeatureCloud to run the FC testing environment directly via the command-line.
controller
Commands to run or stop the FC controller:
- logs: Display the logs for the controller instance
- tail: View the tail of controller logs.
- log-level: Log level filter.
- ls: List all running controller instances
- start: Start a controller instance
- port: Controller port number.
- data-dir: Controller data directory.
- status: Display general status of the controller
- stop: Stop controller instance
app
Basic commands to interact with FC controller regarding the app creation:
- build: Build a docker image for the app
- path: Path to the directory containing the Dockerfile.
- image_name: Image name
- tag: Image tag
- rm: (BOOL) If True, remove intermediate containers.
- download: Download a given docker image from the FeatureCloud.ai docker repository
- name: Image name
- tag: Image tag
- new: Create a new app in a specific directory
- template-name: URL of a specific sample app provided on the FC GitHub repository.
- plot-states: Plot app states and transitions using state names and transition labels (or names). By default, the main is used to access registered states. Alternatively, one can provide a list of .py files containing registered states.
- path: Path to the app directory.
- states: Comma-separated list of
.py
files containing the states (in case of not using the main file). - package: Comma-separated list of sub-packages containing states (in case of not using the main file).
- plot_name: The name of the output PNG plot file.
- publish: Push the docker image to the FC docker repository (FC AI Store)
- name: Image name
- tag: Image tag
- remove: Delete the docker image from the local hard drive
- name: Image name
test
Commands to test app (or workflow of apps) execution:
- delete: Delete a single test run or all test runs
- controller-host: Address of the running controller instance.
- test-id: The test id of the test to be deleted. To delete all tests, omit this option and use "delete all". [required]
- info: Get details about a single test run
- controller-host: Address of the running controller instance.
- test-id: The test id of the test. [required]
- format: Format of the test info (JSON or dataframe).
- list: List all test runs
- controller-host: Address of the running controller instance.
- format: Format of the test info (JSON or dataframe).
- logs: Get the logs of a single test run
- controller-host: Address of the running controller instance.
- test-id: The test id of the test. [required]
- instance-id: The instance id of the client. [required]
- format: Format of the test info (JSON or dataframe).
- start: Start a single test run
- controller-host: Address of the running controller instance.
- client-dirs: Comma-separated client directories.
- generic-dir: Generic directory available for all clients. Content will be copied to the input folder of all instances.
- app-image: The repository URL of the app image. [required]
- channel: The communication channel to be used. It can be
local
orinternet
. - query-interval: (INTEGER) The interval (in seconds) after how many seconds the status call will be performed.
- download-results: (TEXT) A directory name where to download results. This will be created into the
/data/tests
directory.
- stop: Stop a single test run
- controller-host: Address of the running controller instance.
- test-id: The test id of the test to be stopped. [required]
- traffic: Show the traffic of a single test run
- controller-host: Address of the running controller instance.
- test-id: The test id of the test. [required]
- format: Format of the test traffic (JSON or dataframe).
- workflow: Subcommands to manage running a test workflow
- controller-host: Address of the running controller instance. [required]
- wf-dir: Path to the directory containing the workflow. [required]
- wf-file: Python
.py
file including the workflow. [required] - channel: The communication channel to be used. It can be
local
orinternet
. [required] - query-interval: (INTEGER) The interval (in seconds) after how many seconds the status call will be performed. [required]
imp
HTTP request commands to interact with the FC controller.
app
The engine package in FeatureCloud introduces two major elements of app development: app and state. The app class is responsible for registering states and transitions between them, verifying the app logic, and executing them. The app is a highly transparent component that requires minimal developer knowledge. The second class, state, is where local computations carry on. Developers should insert their logic into states by assigning roles, adding and taking transitions. For more information, please refer to our app-template repository.
workflow
Implementing flexible non-linear workflows in the FeatureCloud platform. For more information, please refer to our workflow repository.
References
[1] Matschinske, J., Späth, J., Nasirigerdeh, R., Torkzadehmahani, R., Hartebrodt, A., Orbán, B., Fejér, S., Zolotareva, O., Bakhtiari, M., Bihari, B. and Bloice, M., 2021. The FeatureCloud AI Store for Federated Learning in Biomedicine and Beyond. arXiv preprint arXiv:2105.05734.
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
File details
Details for the file FeatureCloud-0.0.32-py3-none-any.whl
.
File metadata
- Download URL: FeatureCloud-0.0.32-py3-none-any.whl
- Upload date:
- Size: 47.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.11.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | b26e1ecb9bc84fcc49ec9d59a6618f9b480533b9afec99577b42930a2b9c496e |
|
MD5 | 63eee96c6df9de7b4a43fe35907d58ff |
|
BLAKE2b-256 | 192f0ebb6fe69cafea6e4cf363d8a68e662c634eeaa3d98c887d2e5c9bccef1b |