fedbiomed


Namefedbiomed JSON
Version 6.0.0 PyPI version JSON
download
home_pageNone
SummaryCollaborative learning for healthcare
upload_time2025-02-07 11:08:51
maintainerYannick Bouillard <yannick.bouillard@inria.fr>, Francesco Cremonesi <francesco.cremonesi@inria.fr>, Marco Lorenzi <marco.lorenzi@inria.fr>
docs_urlNone
authorYannick Bouillard <yannick.bouillard@inria.fr>, Francesco Cremonesi <francesco.cremonesi@inria.fr>, Marco Lorenzi <marco.lorenzi@inria.fr>, Paul Andrey <paul.andrey@inria.fr>, Lucie Chambon <lucie.chambon@inria.fr>, Erwan Demairy <erwan.demairy@inria.fr>, Thibaud Kloczko <thibaud.kloczko@inria.fr>, Côme Le Breton <come.le-breton@inria.fr>, Jean-Luc Szpyrka <jean-luc@szpyrka.fr>, Riccardo Taiello <riccardo.taiello@inria.fr>, Maya Assal, Samy-Safwan Ayed, Irene Balelli, Nathan Bigaud, Eleonore Birgy, Tristan Cabel, Gaurav D. Chaudary, Nejma El Kourdachi, Yann Fraboni, Lena Le Quintrec, Nathan Lapel, Jonathan Levy, Riham Nehmeh, Ange Ouya, Prapoojitha Santosha-Dasari, Jose-Francisco Saray-Villamizar, Andrea Senacheribbe, Santiago-Smith Silva-Rincon, Carlos Zubiaga
requires_python<3.11,>=3.10
licenseApache 2.0
keywords ai analytics biomedical clinical collaborative federated healthcare learning multicentric
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage
            [![Documentation](https://img.shields.io/badge/Documentation-green)](https://fedbiomed.org)
[![](https://img.shields.io/badge/Medium-black?logo=medium)](https://medium.com/fed-biomed)
[![License](https://img.shields.io/badge/license-Apache--2.0-blue)](https://github.com/fedbiomed/fedbiomed/blob/master/LICENSE.md)
[![Python-versions](https://img.shields.io/badge/python-3.10-brightgreen)](https://www.python.org/)
[![Citation](https://img.shields.io/badge/cite-paper-orange)](https://arxiv.org/abs/2304.12012)
[![PR](https://img.shields.io/badge/PRs-welcome-green)](https://github.com/fedbiomed/fedbiomed/pulls)
[![codecov](https://img.shields.io/codecov/c/gh/fedbiomed/fedbiomed/develop?logo=codecov)](https://app.codecov.io/gh/fedbiomed/fedbiomed/tree/develop)

# Fed-BioMed

## Introduction

Fed-BioMed is an open source project focused on empowering healthcare using non-centralized approaches for statistical analysis and machine learning.

The project is currently based on Python, PyTorch and Scikit-learn, and enables developing and deploying collaborative learning analysis in real-world machine learning applications, including federated learning and federated analytics.

The code is regularly released and available on the **master** branch of this repository. The documentation of the releases can be found at https://fedbiomed.org

Curious users may also be interested by the current developments, occurring in the **develop** branch (https://github.com/fedbiomed/fedbiomed/tree/develop)
Develop branch is WIP branch for next release. It may not be fully usable, tested and documented. Support is provided only for releases.


## Install and run in development environment

Fed-BioMed is developped under Linux Ubuntu & Fedora (should be easily ported to other Linux distributions) and MacOS X.
It is also ported on Windows WSL2.

This README.md file provide a quick start/installation guide for Linux.

Full installation instruction are also available at: https://fedbiomed.org/latest/tutorials/installation/0-basic-software-installation/

An installation guide is also provided for Windows11, which relies on WSL2: https://fedbiomed.org/latest/user-guide/installation/windows-installation/

### Prerequisites

- **Python:** Compatible version (currently 3.10)
- It is recommended to install Python in a local environment, for example, using `pyenv`.

```
pyenv install 3.10
pyenv local 3.10
```

A recommended practice is to use a virtual environment for managing dependencies. For example, if using `venv`:

```
python -m venv fb_env
source fb_env/bin/activate
```

### Install

Fed-BioMed can be installed using `pip` with the following command:

```bash
pip install fedbiomed[node, gui, researcher]
```

If you prefer to use Fed-BioMed in development mode, please refer to the [Developer Environment Installation Documentation](https://fedbiomed.org/latest/developer/development-environment.md).

### Quick Start: Running Fed-BioMed


#### Starting a Basic Node

To start a basic Fed-BioMed node, open a new terminal and execute the following command:

```bash
$ fedbiomed node start
```

#### Uploading New Data to the Node
To upload new data to this node, run:

```bash
$ fedbiomed node dataset add
```

#### Specifying a Component Directory
If you need to run multiple test nodes on the same host, you can specify a different component directory:

```bash
$ fedbiomed node --path ./my-second-node start
```

#### Changing the Default IP Address
To specify a different IP address for connecting to the Fed-BioMed researcher component (default: `localhost`), provide it at launch time:

```bash
$ FBM_RESEARCHER_IP=192.168.0.100 fedbiomed node start
$ FBM_SERVER_HOST=192.168.0.100 fedbiomed researcher start
```

##### Configuration Persistence
- If this option is provided at the first launch or after a clean configuration, it is saved in the configuration file and becomes the default for future launches.
- If given during a subsequent launch, it only applies to that launch without altering the saved configuration.


#### Run a Researcher Notebook

1. Open a new terminal and start the researcher component:

   ```bash
   $ fedbiomed researcher start
   ```

2. This will launch a new Jupyter Notebook environment within the **notebooks** repository. A good starting point is:

   - `101_getting-started.ipynb`: Train a SimpleNet model with federated averaging on the MNIST dataset.


#### Run a Researcher Script

1. Open a new terminal and activate the environment where Fed-BioMed is installed.

2. Convert the notebook to a Python script:

   ```bash
   jupyter nbconvert --output=101_getting-started --to script ./notebooks/101_getting-started.ipynb
   ```
3. Execute the researcher script using:

   ```bash
   $ python ./notebooks/101_getting-started.py
   ```### Clean State (restore environments back to new)

### Cleaning/Removing Fed-BioMed Components

To clean your Fed-BioMed instance:

* Stop the researcher : shutdown the notebook kernel (`Quit` in on the notebook interface or `ctrl-C` on the console)
* Stop the nodes : interrupt (`ctrl-C`) on the nodes console
* Remove all configuration files, dataset sharing configuration, temporary files, caches for all Fed-BioMed components with :

```
$ rm -rf COMPONENT_DIR
```

Where `COMPONENT_DIR` is:
* for a node, the parameter provided as `fedbiomed node -p COMPONENT_DIR` or by default `fbm-node` if no parameter was given
* for a researcher, the parameter provided as `fedbiomed researcher -p COMPONENT_DIR` or by default `fbm-researcher` if no parameter was given


## Fed-BioMed Node GUI

Node GUI provides an interface for Node to manage datasets and deploy new ones. GUI consists of two components, Server and UI. Server is developed on Flask framework and UI is developed using ReactJS. Flask provides API services that use Fed-BioMed's DataManager for deploying and managing dataset. All the source files for GUI has been located on the `${FEDBIOMED_DIR}/gui` directory.

### Starting GUI

Node GUI can be started using Fed-BioMed CLI.

```shell
fedbiomed node [--path [COMPONENT_DIRECTORY]] gui start --data-folder <path-for-data-folder>
```

Please see possible argument using `fedbiomed node gui start --help`.


It is also possible to start the GUI on a specific host and port. By default, it starts on `localhost` as the host and `8484` as the port. To change these settings, you can modify the following command. The GUI is based on HTTPS and will, by default, generate a self-signed certificate. However, you can also start the GUI by specifying the certificate and private key names you want to use for HTTPS support.

```shell
fedbiomed node --path <path/to/component/directory> gui start--data-folder <path-for-data-folder> --cert-file <path-to-certificate> --key-file <path-to-private-key>
```

**IMPORTANT:** Please always consider providing `data-folder` argument while starting the GUI.

```shell
fedbiomed node -p </path/to/my-node> gui --data-folder ../data  --port 80 --host 0.0.0.0
```

### Launching Multiple Node GUI

It is possible to start multiple Node GUIs for different nodes as long as the http ports are different.

```shell
fedbiomed node -p my-node gui start --data-folder ../data --port 8181
fedbiomed node -p my-second-node gui start --data-folder ../data --port 8282
fedbiomed node -p my-second-node gui start --data-folder ../data --port 8383
```

Please see `docs/developer/development-environment.md` to find out how to debug and lunch UI for development purposes.


            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "fedbiomed",
    "maintainer": "Yannick Bouillard <yannick.bouillard@inria.fr>, Francesco Cremonesi <francesco.cremonesi@inria.fr>, Marco Lorenzi <marco.lorenzi@inria.fr>",
    "docs_url": null,
    "requires_python": "<3.11,>=3.10",
    "maintainer_email": "Sergen Cansiz <sergen.cansiz@inria.fr>, Marc Vesin <marc.vesin@inria.fr>",
    "keywords": "ai, analytics, biomedical, clinical, collaborative, federated, healthcare, learning, multicentric",
    "author": "Yannick Bouillard <yannick.bouillard@inria.fr>, Francesco Cremonesi <francesco.cremonesi@inria.fr>, Marco Lorenzi <marco.lorenzi@inria.fr>, Paul Andrey <paul.andrey@inria.fr>, Lucie Chambon <lucie.chambon@inria.fr>, Erwan Demairy <erwan.demairy@inria.fr>, Thibaud Kloczko <thibaud.kloczko@inria.fr>, C\u00f4me Le Breton <come.le-breton@inria.fr>, Jean-Luc Szpyrka <jean-luc@szpyrka.fr>, Riccardo Taiello <riccardo.taiello@inria.fr>, Maya Assal, Samy-Safwan Ayed, Irene Balelli, Nathan Bigaud, Eleonore Birgy, Tristan Cabel, Gaurav D. Chaudary, Nejma El Kourdachi, Yann Fraboni, Lena Le Quintrec, Nathan Lapel, Jonathan Levy, Riham Nehmeh, Ange Ouya, Prapoojitha Santosha-Dasari, Jose-Francisco Saray-Villamizar, Andrea Senacheribbe, Santiago-Smith Silva-Rincon, Carlos Zubiaga",
    "author_email": "Sergen Cansiz <sergen.cansiz@inria.fr>, Marc Vesin <marc.vesin@inria.fr>",
    "download_url": "https://files.pythonhosted.org/packages/50/ca/e66652c0d4607b56517c413e1f7b8bf3497b5777b6bf686f157fd81d1343/fedbiomed-6.0.0.tar.gz",
    "platform": null,
    "description": "[![Documentation](https://img.shields.io/badge/Documentation-green)](https://fedbiomed.org)\n[![](https://img.shields.io/badge/Medium-black?logo=medium)](https://medium.com/fed-biomed)\n[![License](https://img.shields.io/badge/license-Apache--2.0-blue)](https://github.com/fedbiomed/fedbiomed/blob/master/LICENSE.md)\n[![Python-versions](https://img.shields.io/badge/python-3.10-brightgreen)](https://www.python.org/)\n[![Citation](https://img.shields.io/badge/cite-paper-orange)](https://arxiv.org/abs/2304.12012)\n[![PR](https://img.shields.io/badge/PRs-welcome-green)](https://github.com/fedbiomed/fedbiomed/pulls)\n[![codecov](https://img.shields.io/codecov/c/gh/fedbiomed/fedbiomed/develop?logo=codecov)](https://app.codecov.io/gh/fedbiomed/fedbiomed/tree/develop)\n\n# Fed-BioMed\n\n## Introduction\n\nFed-BioMed is an open source project focused on empowering healthcare using non-centralized approaches for statistical analysis and machine learning.\n\nThe project is currently based on Python, PyTorch and Scikit-learn, and enables developing and deploying collaborative learning analysis in real-world machine learning applications, including federated learning and federated analytics.\n\nThe code is regularly released and available on the **master** branch of this repository. The documentation of the releases can be found at https://fedbiomed.org\n\nCurious users may also be interested by the current developments, occurring in the **develop** branch (https://github.com/fedbiomed/fedbiomed/tree/develop)\nDevelop branch is WIP branch for next release. It may not be fully usable, tested and documented. Support is provided only for releases.\n\n\n## Install and run in development environment\n\nFed-BioMed is developped under Linux Ubuntu & Fedora (should be easily ported to other Linux distributions) and MacOS X.\nIt is also ported on Windows WSL2.\n\nThis README.md file provide a quick start/installation guide for Linux.\n\nFull installation instruction are also available at: https://fedbiomed.org/latest/tutorials/installation/0-basic-software-installation/\n\nAn installation guide is also provided for Windows11, which relies on WSL2: https://fedbiomed.org/latest/user-guide/installation/windows-installation/\n\n### Prerequisites\n\n- **Python:** Compatible version (currently 3.10)\n- It is recommended to install Python in a local environment, for example, using `pyenv`.\n\n```\npyenv install 3.10\npyenv local 3.10\n```\n\nA recommended practice is to use a virtual environment for managing dependencies. For example, if using `venv`:\n\n```\npython -m venv fb_env\nsource fb_env/bin/activate\n```\n\n### Install\n\nFed-BioMed can be installed using `pip` with the following command:\n\n```bash\npip install fedbiomed[node, gui, researcher]\n```\n\nIf you prefer to use Fed-BioMed in development mode, please refer to the [Developer Environment Installation Documentation](https://fedbiomed.org/latest/developer/development-environment.md).\n\n### Quick Start: Running Fed-BioMed\n\n\n#### Starting a Basic Node\n\nTo start a basic Fed-BioMed node, open a new terminal and execute the following command:\n\n```bash\n$ fedbiomed node start\n```\n\n#### Uploading New Data to the Node\nTo upload new data to this node, run:\n\n```bash\n$ fedbiomed node dataset add\n```\n\n#### Specifying a Component Directory\nIf you need to run multiple test nodes on the same host, you can specify a different component directory:\n\n```bash\n$ fedbiomed node --path ./my-second-node start\n```\n\n#### Changing the Default IP Address\nTo specify a different IP address for connecting to the Fed-BioMed researcher component (default: `localhost`), provide it at launch time:\n\n```bash\n$ FBM_RESEARCHER_IP=192.168.0.100 fedbiomed node start\n$ FBM_SERVER_HOST=192.168.0.100 fedbiomed researcher start\n```\n\n##### Configuration Persistence\n- If this option is provided at the first launch or after a clean configuration, it is saved in the configuration file and becomes the default for future launches.\n- If given during a subsequent launch, it only applies to that launch without altering the saved configuration.\n\n\n#### Run a Researcher Notebook\n\n1. Open a new terminal and start the researcher component:\n\n   ```bash\n   $ fedbiomed researcher start\n   ```\n\n2. This will launch a new Jupyter Notebook environment within the **notebooks** repository. A good starting point is:\n\n   - `101_getting-started.ipynb`: Train a SimpleNet model with federated averaging on the MNIST dataset.\n\n\n#### Run a Researcher Script\n\n1. Open a new terminal and activate the environment where Fed-BioMed is installed.\n\n2. Convert the notebook to a Python script:\n\n   ```bash\n   jupyter nbconvert --output=101_getting-started --to script ./notebooks/101_getting-started.ipynb\n   ```\n3. Execute the researcher script using:\n\n   ```bash\n   $ python ./notebooks/101_getting-started.py\n   ```### Clean State (restore environments back to new)\n\n### Cleaning/Removing Fed-BioMed Components\n\nTo clean your Fed-BioMed instance:\n\n* Stop the researcher : shutdown the notebook kernel (`Quit` in on the notebook interface or `ctrl-C` on the console)\n* Stop the nodes : interrupt (`ctrl-C`) on the nodes console\n* Remove all configuration files, dataset sharing configuration, temporary files, caches for all Fed-BioMed components with :\n\n```\n$ rm -rf COMPONENT_DIR\n```\n\nWhere `COMPONENT_DIR` is:\n* for a node, the parameter provided as `fedbiomed node -p COMPONENT_DIR` or by default `fbm-node` if no parameter was given\n* for a researcher, the parameter provided as `fedbiomed researcher -p COMPONENT_DIR` or by default `fbm-researcher` if no parameter was given\n\n\n## Fed-BioMed Node GUI\n\nNode GUI provides an interface for Node to manage datasets and deploy new ones. GUI consists of two components, Server and UI. Server is developed on Flask framework and UI is developed using ReactJS. Flask provides API services that use Fed-BioMed's DataManager for deploying and managing dataset. All the source files for GUI has been located on the `${FEDBIOMED_DIR}/gui` directory.\n\n### Starting GUI\n\nNode GUI can be started using Fed-BioMed CLI.\n\n```shell\nfedbiomed node [--path [COMPONENT_DIRECTORY]] gui start --data-folder <path-for-data-folder>\n```\n\nPlease see possible argument using `fedbiomed node gui start --help`.\n\n\nIt is also possible to start the GUI on a specific host and port. By default, it starts on `localhost` as the host and `8484` as the port. To change these settings, you can modify the following command. The GUI is based on HTTPS and will, by default, generate a self-signed certificate. However, you can also start the GUI by specifying the certificate and private key names you want to use for HTTPS support.\n\n```shell\nfedbiomed node --path <path/to/component/directory> gui start--data-folder <path-for-data-folder> --cert-file <path-to-certificate> --key-file <path-to-private-key>\n```\n\n**IMPORTANT:** Please always consider providing `data-folder` argument while starting the GUI.\n\n```shell\nfedbiomed node -p </path/to/my-node> gui --data-folder ../data  --port 80 --host 0.0.0.0\n```\n\n### Launching Multiple Node GUI\n\nIt is possible to start multiple Node GUIs for different nodes as long as the http ports are different.\n\n```shell\nfedbiomed node -p my-node gui start --data-folder ../data --port 8181\nfedbiomed node -p my-second-node gui start --data-folder ../data --port 8282\nfedbiomed node -p my-second-node gui start --data-folder ../data --port 8383\n```\n\nPlease see `docs/developer/development-environment.md` to find out how to debug and lunch UI for development purposes.\n\n",
    "bugtrack_url": null,
    "license": "Apache 2.0",
    "summary": "Collaborative learning for healthcare",
    "version": "6.0.0",
    "project_urls": {
        "Documentation": "https://fedbiomed.org",
        "Homepage": "https://fedbiomed.org",
        "Repository": "https://github.com/fedbiomed/fedbiomed"
    },
    "split_keywords": [
        "ai",
        " analytics",
        " biomedical",
        " clinical",
        " collaborative",
        " federated",
        " healthcare",
        " learning",
        " multicentric"
    ],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "a9f338740195267067de43dbe3575ee7bc31cfd64b38aa5b91277fa608a8af41",
                "md5": "9a594f7ccf77dbc58624b53e6848fef3",
                "sha256": "b578d4a56ca0c9e5273259584962d9ddecd23a5d6451c6efe79fc048f67aea36"
            },
            "downloads": -1,
            "filename": "fedbiomed-6.0.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "9a594f7ccf77dbc58624b53e6848fef3",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": "<3.11,>=3.10",
            "size": 5925861,
            "upload_time": "2025-02-07T11:08:49",
            "upload_time_iso_8601": "2025-02-07T11:08:49.170296Z",
            "url": "https://files.pythonhosted.org/packages/a9/f3/38740195267067de43dbe3575ee7bc31cfd64b38aa5b91277fa608a8af41/fedbiomed-6.0.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "50cae66652c0d4607b56517c413e1f7b8bf3497b5777b6bf686f157fd81d1343",
                "md5": "a22282edfbf20008af6a7800b13b8e95",
                "sha256": "d9c023eb728187764630a0cdb26cd8c7118b4904805d945f184a56d14e800d9e"
            },
            "downloads": -1,
            "filename": "fedbiomed-6.0.0.tar.gz",
            "has_sig": false,
            "md5_digest": "a22282edfbf20008af6a7800b13b8e95",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": "<3.11,>=3.10",
            "size": 1547368,
            "upload_time": "2025-02-07T11:08:51",
            "upload_time_iso_8601": "2025-02-07T11:08:51.357088Z",
            "url": "https://files.pythonhosted.org/packages/50/ca/e66652c0d4607b56517c413e1f7b8bf3497b5777b6bf686f157fd81d1343/fedbiomed-6.0.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-02-07 11:08:51",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "fedbiomed",
    "github_project": "fedbiomed",
    "travis_ci": false,
    "coveralls": true,
    "github_actions": true,
    "tox": true,
    "lcname": "fedbiomed"
}
        
Elapsed time: 3.26592s