nodeJS implementation of an OpenMined data mine
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.gitYou 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 devAlternatively 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 startYou should see the following output:
To list available commands, execute npm start -- --help:
Currently the Mine polls a fixed contractAddress for available models and lists statistics.
Features that should follow:
- Poll
Sonarfor available models - Download the model/weights via
IPFS - Train the model using
syft - Get
contractAddress/mineAddressvia arguments/env variables - Filter models for those matching available training data (requires feature change on Sonar contract)
- Proper docker setup to allow multiple mines
- the
npm installrequires 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%
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 👾