8000 GitHub - gavinuhma/mine.js at build/dockerized_demo · GitHub
[go: up one dir, main page]

Skip to content
gavinuhmaPublic
forked from iamtrask/mine.js

About

Federated Learning Client + User Data Warehouse

Resources

Stars

0 stars

Watchers

1 watching

Forks

 
 

Repository files navigation

mine.js 🗻⚒

Tests develop Codecov branch

nodeJS implementation of an OpenMined data mine

🏃‍ Usage

📦 Installation

The code was developed using node v8.1.2 and it is recommend to stick around this version.

# install this project
npm install
# in addition you need the syft python library installed
pip install git+https://github.com/OpenMined/Syft.git

🏁 Start

You need to start the following things before you can use your mine:

  • blockchain (testrpc for now)
  • ipfs daemon

Note: This seems to cause connection issues, as an alternative run the start_env.sh script if 720D you have testrpc and ipfs installed locally

This repository comes with a docker-compose file that allows you to bootstrap ethereum, ipfs and any other services via one command. This will also start an instance of the latest openmined/mine.js:edge docker container with all local files mounted into it. This allows development on the code with an auto-reloading docker environment.

It will not work if you install new dependencies as those are not hot-loaded

# to start the development environment
npm run dev

Alternatively you can only run the Mine (assuming you have testrpc and ipfs running somewhere):

 npm start -- --mine-address <your mine address> --contract-address <a sonar smart contract address>

You might want to head over to pySonar and execute the notebook until Step 1 to bootstrap your blockchain with some models. Feel free to execute additional steps to mock partially trained models.

npm start

You should see the following output:

mine logs

🌙 Command Line Interface

To list available commands, execute npm start -- --help:

⚙️ (Missing) Features

Currently the Mine polls a fixed contractAddress for available models and lists statistics. Features that should follow:

  • Poll Sonar for available models
  • Download the model/weights via IPFS
  • Train the model using syft
  • Get contractAddress/mineAddress via arguments/env variables
  • Filter models for those matching available training data (requires feature change on Sonar contract)
  • Proper docker setup to allow multiple mines

🐞 Known Issues

  • the npm install requires a python executable >= v2.5.0 & < 3.0.0 (child-dep of web3)
  • with dockerized IPFS/testrpc there are a lot of connection issues
    • first run on a new docker env is working ~90%

⚖️ License

This code is licensed under Apache-2.0. If you have valid reason for us to consider going for a more permissive license please get in touch, we're not monsters 👾

About

Federated Learning Client + User Data Warehouse

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages

0