Giter Club home page Giter Club logo

vantage6-node-ncdc's Introduction


vantage6

A privacy preserving federated learning solution

Coverage Status Codacy Badge PyPI version Build Status

DocumentationInstallationHow To UseWhitelistingNode ImagesContributingReferences


This repository is part of vantage6, our priVAcy preserviNg federaTed leArninG infrastructurE for Secure Insight eXchange. Other repositories include:

📚 Documentation

The following is a short cheat sheet of how to setup a vantage6 node. For a more detailed, comprehensive guide, please refer to our website https://vantage6.ai and the official documentation: https://docs.vantage6.ai/.

💿 Installation

This repository contains the code for a vantage6 node. Installation can be done in two different ways:

Option 1 - Directly from pypi

pip install vantage6-node

Option 2 - From this repository

# Clone repository
git clone https://github.com/iknl/vantage6-node

# Go into the repository
cd vantage6-node

# install vantage6-node and dependencies
pip install -e .

🐣 How to use

# Show the available commands
vnode --help

# Create a new configuration
vnode new [OPTIONS]

# start a configuration
vnode start [OPTIONS]

# See where usefull files are located
vnode files [OPTIONS]

# Stop one or more nodes
vnode stop [OPTIONS]

# Attach the log output of a node to the console
vnode attach [OPTIONS]

🚦 Whitelisting

The algorithm container runs in an isolated network, thus preventing any connection to an external endpoint. However, it is possible to whitelist certain domains, allowing API calls. To accomplish this, the node configuration file should contain an entry for the whitelisted domains:

  server_url: http://vantage6_server
  task_dir: tasks
  algorithm_env:
  whitelist:
      - central.xnat.org
      - google.com
      - ...

The request in the algorithm should build the endpoint in the following way: <proxy_server>/<host> Example using xnatpy to get a connection to an XNAT open server:

session = xnat.connect(f'{os.getenv("HOST")}:{os.getenv("PORT")}/https://central.xnat.org')

The host will only be recognizable if provided with the protocol (https://<host>).

A docker image is available in the following repository: pmateus/vantage6-node-whitelisted:1.0.0.

📇 Node Images

Some algorithms may require more computation power than what's provided by the machine running the node (e.g. be prone to run in a GPU cluster). In those cases, specific images can be used at each node to run the necessary commands and deploy the algorithm in the chosen environment. To accomplish this, the node configuration file should contain an entry for the docker image placeholders:

  server_url: http://vantage6_server
  task_dir: tasks
  algorithm_env:
  whitelist:
    ...
  docker_images_placeholders:
    gpu_image: docker-image-name
    placeholder-2: docker-image-name-2
    ...

When sending the request for a task, the placeholder should be used and the algorithm image provided as input:

input_ = {
    "master": "true",
    "method":"master",
    "args": [],
    "kwargs": {
        "algorithm_image": "user/deep-neural-network",
    }
}

task = client.post_task(
    name="Run algorithm in a GPU cluster at each node",
    image="gpu_image",
    collaboration_id=1,
    input_= input_
)

Each cluster will run it's own docker image for the chosen placeholder which will deploy the algorithm container (in the example, the user/deep-neural-network) in the right environment (e.g. the GPU cluster).

A docker image is available in the following repository: pmateus/vantage6-node-whitelisted:2.0.0.

💝 Contributing

We hope to continue developing, improving, and supporting vantage6 with the help of the federated learning community. If you are interested in contributing, first of all, thank you! Second, please take a look at our contributing guidelines

🔏 Data Protection Impact Assessment

Deploying Federated Learning solutions in real life often requires careful analysis and approval of a variety of legal entities. As part of these processes, we at IKNL have written a Data Protection Impact Assessment (DPIA), which you can find here. Please note that this DPIA was executed by IKNL and is specific for our situation. It can be used as an example by other organizations, but it cannot be used verbatim.

✒️ References

If you are using vantage6, please cite this repository as well as the accompanying paper as follows:

  • Frank Martin, Melle Sieswerda, Hasan Alradhi, et al. vantage6. Available at https://doi.org/10.5281/zenodo.3686944. Accessed on [MONTH, 20XX].
  • Arturo Moncada-Torres, Frank Martin, Melle Sieswerda, Johan van Soest, Gijs Gelijnse. VANTAGE6: an open source priVAcy preserviNg federaTed leArninG infrastructurE for Secure Insight eXchange. AMIA Annual Symposium Proceedings, 2020, p. 870-877. [BibTeX, PDF]

vantage6CommonServer • Node • ClientUIMaster

vantage6-node-ncdc's People

Contributors

arturomoncadatorres avatar codacy-badger avatar dsmits avatar frankcorneliusmartin avatar intgren avatar jvsoest avatar mellesies avatar pedro-cmat avatar

Watchers

 avatar  avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.