Metadata-Version: 2.1
Name: monai-nvflare
Version: 0.2.2
Summary: MONAI NVIDIA FLARE integration
Home-page: https://github.com/NVIDIA/NVFlare
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: License :: OSI Approved :: Apache Software License
Classifier: Operating System :: POSIX :: Linux
Requires-Python: >=3.8,<3.11
Description-Content-Type: text/markdown
Requires-Dist: monai (>=1.1.0)
Requires-Dist: nvflare (>=2.3.0)

# MONAI Integration

## Objective
Integration with [MONAI](https://monai.io/)'s federated learning capabilities.

Add `ClientAlgoExecutor` class to allow using MONAI's `ClientAlgo` class in federated scenarios.

### Goals:

Allow the use of bundles from the MONAI [model zoo](https://github.com/Project-MONAI/model-zoo) or custom configurations with NVFlare.

### Non-goals:

n/a

## Background
MONAI allows the definition of AI models using the "[bundle](https://docs.monai.io/en/latest/bundle.html)" concept. 
It allows for easy experimentation and sharing of models that have been developed using MONAI.
Using the bundle configurations, we can use MONAI's `MonaiAlgo` (the implementation of `ClientAlgo`) to execute a bundle model in a federated scenario using NVFlare.

![Federated Learning Module in MONAI (https://docs.monai.io/en/stable/modules.html#federated-learning)](https://docs.monai.io/en/stable/_images/federated.svg)

## Description
NVFlare executes the `ClientAlgo` class using the `ClientAlgoExecutor` class provided with this package.

### Examples

For an example of using [NVIDIA FLARE](https://nvflare.readthedocs.io/en/main/index.html) to train
a medical image analysis model using federated averaging ([FedAvg](https://arxiv.org/abs/1602.05629))
and [MONAI Bundle](https://docs.monai.io/en/latest/mb_specification.html),
see the [examples](./examples/README.md).

## Requirements

We recommend following the instructions for setting up a [virtual environment](../../examples/README.md#set-up-a-virtual-environment),
and using it in [JupyterLab](../../examples/README.md#set-up-jupyterlab-for-notebooks) for running the notebooks the MONAI integration examples.

Install MONAI-NVFlare integration from [PyPI](https://pypi.org/):
```
pip install monai_nvflare
```

(Optional) Install MONAI-NVFlare integration from source:
```
pip install -e .
```
