GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - EURACAN/vantage6-starter-utils-algorithm: Algorithms used for data version check and a fix for keeping the nodes online

BranchesTags
Open more actions menu

Latest commit

 

History

16 Commits
16 Commits

Folders and files

NameName
Last commit message
Last commit date
.github/workflows
.github/workflows
 
 
v6-utils-py
v6-utils-py
 
 
.gitignore
.gitignore
 
 
Dockerfile
Dockerfile
 
 
LICENSE
LICENSE
 
 
README.md
README.md
 
 
requirements.txt
requirements.txt
 
 
setup.py
setup.py
 
 

Repository files navigation


vantage6

A privacy preserving federated learning solution


Federated Utilities

⚠️ priVAcy preserviNg federaTed leArninG infrastructurE for Secure Insight eXchange (VANTAGE6)
This algorithm is part of VANTAGE6. A docker build of this algorithm can be obtained from harbor.vantage6.ai/algorithms/utils

Collection of tools that can be used on vantage6-nodes.

  • fetch_static_file - Obtain a static file from the node
  • list_static_files - List static files on the node

Usage fetch_static_file

from vantage6.client import Client

# Create, athenticate and setup client
client = Client("http://127.0.0.1", 5000, "")
client.authenticate("[email protected]", "password")
client.setup_encryption(None)

# Define algorithm input
input_ = {
    "method":"fetch_static_file",
    "args": [],
    "kwargs": {'filename': 'name_of_the_static_file.pdf'} # optional argument
}

# Send the task to the central server
task = client.task.create(
    name="testing",
    image="harbor.vantage6.ai/algorithms/utils",
    collaboration=1,
    input=input_,
    description="Human readable description",
    organizations=[2]
)

# Retrieve the task information
task_info = client.task.get(id_=task.get("id"), include_results=True)

# Retrieve the result (file in this case)
res = client.result.get(task_info['results'][0]['id'])
result = res['result']

# Write the bytes to a file
with open('name_of_the_static_file.pdf', 'wb') as f:
  f.write(result)

Usage list_static_files

from vantage6.client import Client

# Create, athenticate and setup client
client = Client("http://127.0.0.1", 5000, "")
client.authenticate("[email protected]", "password")
client.setup_encryption(None)

# Define algorithm input
input_ = {
    "method":"list_static_files",
    "args": [],
    "kwargs": {'extension': ['.pdf']} # optional argument, otherwise use: "kwargs": {}
}

# Send the task to the central server
task = client.task.create(
    name="testing",
    image="harbor2.vantage6.ai/algorithms/utils",
    collaboration=1,
    input=input_,
    description="Human readable description",
    organizations=[2]
)

# Retrieve the task information
task_info = client.task.get(id_=task.get("id"), include_results=True)

# Retrieve the result (file in this case)
res = client.result.get(task_info['results'][0]['id'])
result = res['result']

Node configuration

The algorithm looks by default in the /mnt/data folder. It is possible to let the algorithm use a different folder by specifying the algorithm environment variable STATIC_FOLDER. It is also possible to specify a default file name by setting STATIC_FILENAME. Note that the user argument filename has priority. Add the block algorithm_env to the node configuration file to do so:

  application:
    ...
    algorithm_env:
      STATIC_FOLDER: /mnt/data/some/other/folder
      STATIC_FILENAME: filename.txt
    ...

vantage6

About

Algorithms used for data version check and a fix for keeping the nodes online

Topics

legacystarterversion2

Resources

Readme
MIT license
Activity
Custom properties

Stars

0 stars

Watchers

4 watching

Forks

0 forks
Report repository

Releases

Packages

Used by

Contributors

Languages

Generated from IKNL/v6-boilerplate-py
You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.