https://github.com/vvmnnnkv/syft-js-worker
Javascript worker for PySyft
https://github.com/vvmnnnkv/syft-js-worker
js privacy syft
Last synced: about 1 year ago
JSON representation
Javascript worker for PySyft
- Host: GitHub
- URL: https://github.com/vvmnnnkv/syft-js-worker
- Owner: vvmnnnkv
- Created: 2019-07-25T11:49:08.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2019-08-20T07:33:49.000Z (almost 7 years ago)
- Last Synced: 2025-01-29T04:36:08.787Z (over 1 year ago)
- Topics: js, privacy, syft
- Language: JavaScript
- Homepage:
- Size: 38.1 KB
- Stars: 4
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Syft Web Worker
This project is created for Udacity's [Secure and Private AI](https://www.udacity.com/course/secure-and-private-ai--ud185) challenge course.
It explores possibility to have PySyft worker running in the web browser,
which potentially expands PySyft functionality to a very large user-base.
The back-end for tensor operations in browser is tf.js.
The current project's state is 'proof of concept' where tensors can be moved to/from browser and a limited set of tensor operations is possible.
Further direction is to try to use web client for federated learning.
## Demo
Follow this [Colab jupyter notebook](https://colab.research.google.com/github/vvmnnnkv/syft-js-worker/blob/master/Syft%20Web%20Client%20Demo.ipynb).
For local installation:
```
pip install -Ur requirements.txt
python run_socketio_server.py
```
Update `index.html` and notebook code with server's URL (e.g. `http://localhost:5000`).
## Work in progress
There's zero infrastructure work done (e.g. dependency management, building, etc.), and javascript is tested in Chrome only.
## Acknowledgments
* [syft.js](https://github.com/OpenMined/syft.js) - inspiration :)
* [PySyft Android Worker](https://github.com/OpenMined/AndroidWorker) - server script and some PySyft protocol details
* Numpy to array code borrowed from: https://gist.github.com/nvictus/88b3b5bfe587d32ac1ab519fd0009607
* Array to numpy code borrowed from: https://github.com/propelml/tfjs-npy/blob/master/npy.ts
* Thanks Udacity's [Secure and Private AI](https://www.udacity.com/course/secure-and-private-ai--ud185) challenge course and Andrew Trask for great content