Giter Site home page Giter Site logo

vantage6-test-algorithms's Introduction

Vantage6 test algorithms

This repo contains a couple of simple algorithms implemented in python that run on the Vantage6 infrastructure. The algorithms are available as docker image: harbor.carrier-mu.src.surf-hosted.nl/carrier/vantage6-test-algorithms

Examples

Combined column names

The column_names master algorithm collects all column names from the nodes in the collaboration and combines them in one big set.

import vantage6.client as vtgclient
HOST = 'http://your.vantage.server' # Replace with your vantage6 server URI
PORT = 5000
IMAGE = 'harbor2.vantage6.ai/testing/v6-test-py'

USERNAME = 'your_username'
PASSWORD = 'your_password'

COLLABORATION_ID = 1 # Replace with the collaboration id of your account
ORGANIZATION_IDS = [2, 3, 6] # The organizations for which you would like to collect the column names

client = vtgclient.Client(HOST, PORT)
client.authenticate(USERNAME, PASSWORD)


client.setup_encryption('path/to/rsa/keyfile') # If no encryption configured do client.setup_encryption(None)

# For organization ids you need to specify the organization where the master algorithm should be run. This algorithm 
# will then query which other organizations are part of the collaboration and will in turn trigger the 
# secondary task on their  nodes. Results will be collected in this single master organization, aggregated and sent 
# back to the user. It is likely that you wish to exclude the master organization from running the secondary task. 
# This can be specified in `'exclude_orgs'` as follows.
task = client.post_task('column_names', image=IMAGE, 
                        collaboration_id=COLLABORATION_ID,
                        organization_ids=[2],
                        input_={'method': 'column_names', 'master':True, 'kwargs':{'exclude_orgs': [2]}})

result = client.get_results(task_id=task['id'])

print(result)

vantage6-test-algorithms's People

Contributors

dsmits avatar

Watchers

 avatar James Cloos avatar Sven van der Burg avatar

Forkers

mindrenee

vantage6-test-algorithms's Issues

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.