This algorithm is part of the vantage6 solution. Vantage6 allows to execute computations on federated datasets. This repository provides a boilerplate for new algorithms.
This vantage6 algorithm includes a handy client class that helps you run its methods as a vantage6 user.
from vantage6.client import v6client
client = v6client.Client(YOUR_V6_HOST, YOUR_V6_PORT, verbose=True)
client.authenticate(YOUR_USERNAME, YOUR_PASSWORD)
client.setup_encryption(YOUR_PRIVATE_KEY)
n2nclient = N2NDiagnosticsClient(client)
# Master node should be the organization id of the node that you want to run the primary
# algorithm on
# Other nodes should be the nodes in the collaboration that you want the master_node to connect to.
task = n2nclient.echo(master_node, collaboration_id, other_nodes)
See the documentation for detailed instructions on how to install and use the server and nodes.