Coder Social home page Coder Social logo

bendecoste / deprecated-pysyft Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 0.0 814 KB

This is a reference implementation for a previous numpy backed PySyft repository

License: Apache License 2.0

Makefile 0.26% Python 81.70% Shell 0.05% Jupyter Notebook 17.98%

deprecated-pysyft's Introduction

Syft

Chat on Slack Build Status codecov

Homomorphically Encrypted Deep Learning Library

The goal of this library is to give the user the ability to efficiently train Deep Learning models in a homomorphically encrypted state, without needing to be an expert in either. Furthermore, by understanding the characteristics of both Deep Learning and Homomorphic Encryption, we hope to find a very performant combinations of the two. See the notebooks folder for tutorials on how to use the library. Also, check the main demonstration from the Sonar project.

Local setup

Prerequisites

  • Make sure Python 3.5+ in installed on your machine by checking python3 --version
  • Install the base libraries listed here
  • Set up a virtual environment for the Python libraries (optional, recommended)
  • Install Capsule dependency if you are going to develop and run tests.

Python Requirements

The Python dependencies are listed in requirements.txt and can be installed through

pip3 install -r requirements.txt

Additional test and development dependencies such as scikit-learn and Jupyter are listed in dev-requirements.txt:

pip3 install -r dev-requirements.txt

PySyft installation

If you simply want to to use PySyft, it is enough to install the library with:

python3 setup.py install

Instead, if you want to make changes to the source, fix bugs, add features etc., it's recommended to install PySyft in development mode:

python3 setup.py develop

Anaconda

bash install_for_anaconda_users.sh

Note: if after running the above script, you have troubles importing Syft in your Jupyter notebook, try this:

# activate your env, if you haven't already
source activate openmined  
pip install ipykernel
python -m ipykernel install --user --name=openmined

Windows

conda install -c conda-forge gmpy2
pip install -r requirements.txt
python setup.py install

Notebooks

The make target notebook will launch a Jupyter server (either locally or in the container).

make notebook

Testing

The make target test will run all tests with pytest and flake8 (either locally or in the container).

make test

Setup with Docker

The fastest way to get started is to use the pre-assembled Docker image (works on all major operating systems). Alternatively, one can manually set up all the dependencies and develop locally.

Get Docker

Install Docker following the instructions on the website.

For macOS users with Homebrew installed, use:

brew cask install docker
open -a docker

You can ensure that Docker is properly installed and running by checking: docker --version.

Run PySyft in a container

First, clone this repository and navigate into its folder:

git clone https://github.com/OpenMined/PySyft.git
cd PySyft

Now, start a container based on openmined/pysyft:

make docker-build
make docker-run

In this container you'll be able to open a Python shell, import the library and develop with it.

However, if you want to use Jupyter, try the provided notebooks, and make changes to the source, you should create your personal development image:

make docker-build-dev
make docker-run image=openmined/pysyft-dev:local

Inside the container you can run any make targets such as test or notebook.

For Contributors

If you are interested in contributing to Syft, first check out our Contributor Quickstart Guide and then sign into our Slack Team channel #team_pysyft to let us know which projects sound interesting to you! (or propose your own!).

Relevant Literature

As both Homomorphic Encryption and Deep Learning are still somewhat sparsely known, below is a curated list of relevant reading materials to bring you up to speed with the major concepts and themes of these exciting fields.

Encrypted Deep Learning - Recommended Reading:

Homomorphic Encryption - Recommended Reading:

Relevant Papers:

Related Libraries:

Related Blogs:

License

Apache-2.0 by OpenMined contributors

deprecated-pysyft's People

Contributors

iamtrask avatar

Stargazers

 avatar

Watchers

 avatar

Forkers

chatsam

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.