Skip to content

Latest commit

 

History

History
125 lines (110 loc) · 8.63 KB

File metadata and controls

125 lines (110 loc) · 8.63 KB

NVIDIA FLARE Examples

NVIDIA FLARE provides several examples to help you get started using federated learning for your own applications.

The provided examples cover different aspects of NVIDIA FLARE, such as using the provided Controllers for "scatter and gather" or "cyclic weight transfer" workflows and example Executors to implement your own training and validation pipelines. Some examples use the provided "task data" and "task result" Filters for homomorphic encryption and decryption or differential privacy. Furthermore, we show how to use different components for FL algorithms such as FedAvg, FedProx, and FedOpt. We also provide domain-specific examples for deep learning and medical image analysis.

NOTE: To run examples, please follow the instructions for Installation and any additional steps specified in the example readmes.

Getting started

To get started with NVIDIA FLARE, please follow the Getting Started Guide in the documentation. This walks you through installation, creating a POC workspace, and deploying your first NVIDIA FLARE Application. The following examples will detail any additional requirements in their requirements.txt.

Set up a virtual environment

We recommend setting up a virtual environment before installing the dependencies of the examples.

python3 -m pip install --user --upgrade pip
python3 -m pip install --user virtualenv

(If needed) make all shell scripts executable using

find . -name ".sh" -exec chmod +x {} \;

activate your virtual environment.

source ./set_env.sh

within each example folder, install required packages for training

pip install --upgrade pip
pip install -r requirements.txt

(optional) some examples contains script for plotting the TensorBoard event files, if needed, please also install

pip install -r plot-requirements.txt

Notebooks

To run examples including notebooks, we recommend using JupyterLab.

After activating your virtual environment, install JupyterLab

pip install jupyterlab

Register the virtual environment kernel

python -m ipykernel install --user --name="nvflare_example"

Start a Jupyter Lab

jupyter lab .

When you open a notebook, select the kernel nvflare_example using the dropdown menu at the top right. Selecting a JupyterLab kernel

1. Hello World Examples

1.1 Workflows

1.2 Deep Learning

2. Tutorial notebooks

3. FL algorithms

4. Traditional ML examples

5. Medical Image Analysis

6. Federated Statistics

7. Federated Policies

  • Federated Policies
    • Discuss the federated site policies for authorization, resource and data privacy management

8. Experiment tracking