Skip to main content

A Library for Private, Secure Deep Learning

Project description

Introduction

Binder Build Status Chat on Slack FOSSA Status

PySyft is a Python library for secure, private Deep Learning. PySyft decouples private data from model training, using Federated Learning, Differential Privacy, and Multi-Party Computation (MPC) within PyTorch. Join the movement on Slack.

PySyft in Detail

A more detailed explanation of PySyft can be found in the paper on arxiv

PySyft has also been explained in video form by Siraj Raval

Pre-Installation

Optionally, we recommend that you install PySyft within the Conda virtual environment. If you are using Windows, I suggest installing Anaconda and using the Anaconda Prompt to work from the command line.

conda create -n pysyft python=3
conda activate pysyft # some older version of conda require "source activate pysyft" instead.
conda install jupyter notebook

Installation

PySyft supports Python >= 3.6 and PyTorch 1.1.0

pip install syft

If you have an installation error regarding zstd, run this command and then re-try installing syft.

pip install --upgrade --force-reinstall zstd

If this still doesn't work, and you happen to be on OSX, make sure you have OSX command line tools installed and try again.

You can also install PySyft from source on a variety of operating systems by following this installation guide.

Run Local Notebook Server

All the examples can be played with by running the command

make notebook

and selecting the pysyft kernel

Use the Docker image

Instead of installing all the dependencies on your computer, you can run a notebook server (which comes with Pysyft installed) using Docker. All you will have to do is start the container like this:

$ docker container run openmined/pysyft-notebook

You can use the provided link to access the jupyter notebook (the link is only accessible from your local machine).

NOTE: If you are using Docker Desktop for Mac, the port needs to be forwarded to localhost. In that case run docker with: bash $ docker container run -p 8888:8888 openmined/pysyft-notebook to forward port 8888 from the container's interface to port 8888 on localhost and then access the notebook via http://127.0.0.1:8888/?token=...

You can also set the directory from which the server will serve notebooks (default is /workspace).

$ docker container run -e WORKSPACE_DIR=/root openmined/pysyft-notebook

You could also build the image on your own and run it locally:

$ cd docker-image
$ docker image build -t pysyft-notebook .
$ docker container run pysyft-notebook

More information about how to use this image can be found on docker hub

Try out the Tutorials

A comprehensive list of tutorials can be found here

These tutorials cover how to perform techniques such as federated learning and differential privacy using PySyft.

High-level Architecture

alt text

Start Contributing

The guide for contributors can be found here. It covers all that you need to know to start contributing code to PySyft in an easy way.

Also join the rapidly growing community of 5000+ on Slack. The slack community is very friendly and great about quickly answering questions about the use and development of PySyft!

Troubleshooting

We have written an installation example in this colab notebook, you can use it as is to start working with PySyft on the colab cloud, or use this setup to fix your installation locally.

Organizational Contributions

We are very grateful for contributions to PySyft from the following organizations!

Udacity coMind Arkhn Dropout Labs

Disclaimer

Do NOT use this code to protect data (private or otherwise) - at present it is very insecure. Come back in a couple months.

License

Apache License 2.0

FOSSA Status

Project details


Release history Release notifications | RSS feed

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

syft-0.1.25a1.tar.gz (184.3 kB view details)

Uploaded Source

Built Distribution

syft-0.1.25a1-py3-none-any.whl (287.6 kB view details)

Uploaded Python 3

File details

Details for the file syft-0.1.25a1.tar.gz.

File metadata

  • Download URL: syft-0.1.25a1.tar.gz
  • Upload date:
  • Size: 184.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.35.0 CPython/3.7.3

File hashes

Hashes for syft-0.1.25a1.tar.gz
Algorithm Hash digest
SHA256 73e1a07718af37a7733d5fb0dfb1330e257ae6ecd88e7fececb7f63539afb240
MD5 e68a084846200858e97a27c55a44600c
BLAKE2b-256 1737e4155b442036bcd9c71e34cadb1361836f003407505cfd784132a1f385da

See more details on using hashes here.

File details

Details for the file syft-0.1.25a1-py3-none-any.whl.

File metadata

  • Download URL: syft-0.1.25a1-py3-none-any.whl
  • Upload date:
  • Size: 287.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.35.0 CPython/3.7.3

File hashes

Hashes for syft-0.1.25a1-py3-none-any.whl
Algorithm Hash digest
SHA256 85765d3fa9ebf21b3f209aea2ff3feea72871b4d83d939fc4901afec8a51a047
MD5 ea532ec6cfcf3119cbc1fa707a848416
BLAKE2b-256 3897ed6d24eb3453d03ca59a2e5f271d44b664513c625b3f194b8ea98969b4d9

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page