You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Generate the status badge on Github using Github Actions
Summary: Since CircleCI is disabled, we now use tests from Github Actions to indicate its status on the Github main page.
Differential Revision: D67990187
[Opacus](https://opacus.ai) is a library that enables training PyTorch models with differential privacy.
11
-
It supports training with minimal code changes required on the client, has little impact on training performance, and allows the client to online track the privacy budget expended at any given moment.
10
+
[Opacus](https://opacus.ai) is a library that enables training PyTorch models
11
+
with differential privacy. It supports training with minimal code changes
12
+
required on the client, has little impact on training performance, and allows
13
+
the client to online track the privacy budget expended at any given moment.
12
14
13
15
14
16
## Target audience
17
+
15
18
This code release is aimed at two target audiences:
16
-
1. ML practitioners will find this to be a gentle introduction to training a model with differential privacy as it requires minimal code changes.
17
-
2. Differential Privacy researchers will find this easy to experiment and tinker with, allowing them to focus on what matters.
18
19
20
+
1. ML practitioners will find this to be a gentle introduction to training a
21
+
model with differential privacy as it requires minimal code changes.
22
+
2. Differential Privacy researchers will find this easy to experiment and tinker
23
+
with, allowing them to focus on what matters.
19
24
20
25
## Installation
26
+
21
27
The latest release of Opacus can be installed via `pip`:
28
+
22
29
```bash
23
30
pip install opacus
24
31
```
32
+
25
33
OR, alternatively, via `conda`:
34
+
26
35
```bash
27
36
conda install -c conda-forge opacus
28
37
```
29
38
30
-
You can also install directly from the source for the latest features (along with its quirks and potentially occasional bugs):
39
+
You can also install directly from the source for the latest features (along
40
+
with its quirks and potentially occasional bugs):
41
+
31
42
```bash
32
43
git clone https://github.com/pytorch/opacus.git
33
44
cd opacus
34
45
pip install -e .
35
46
```
36
47
37
48
## Getting started
38
-
To train your model with differential privacy, all you need to do is to instantiate a `PrivacyEngine` and pass your model, data_loader, and optimizer to the engine's `make_private()` method to obtain their private counterparts.
49
+
50
+
To train your model with differential privacy, all you need to do is to
51
+
instantiate a `PrivacyEngine` and pass your model, data_loader, and optimizer to
52
+
the engine's `make_private()` method to obtain their private counterparts.
The [MNIST example](https://github.com/pytorch/opacus/tree/main/examples/mnist.py) shows an end-to-end run using Opacus. The [examples](https://github.com/pytorch/opacus/tree/main/examples/) folder contains more such examples.
We've built a series of IPython-based tutorials as a gentle introduction to training models
72
-
with privacy and using various Opacus features.
89
+
We've built a series of IPython-based tutorials as a gentle introduction to
90
+
training models with privacy and using various Opacus features.
73
91
74
92
-[Building an Image Classifier with Differential Privacy](https://github.com/pytorch/opacus/blob/main/tutorials/building_image_classifier.ipynb)
75
93
-[Training a differentially private LSTM model for name classification](https://github.com/pytorch/opacus/blob/main/tutorials/building_lstm_name_classifier.ipynb)
@@ -79,9 +97,13 @@ with privacy and using various Opacus features.
79
97
-[Opacus Guide: Module Validator and Fixer](https://github.com/pytorch/opacus/blob/main/tutorials/guide_to_module_validator.ipynb)
80
98
81
99
## Technical report and citation
82
-
The technical report introducing Opacus, presenting its design principles, mathematical foundations, and benchmarks can be found [here](https://arxiv.org/abs/2109.12298).
100
+
101
+
The technical report introducing Opacus, presenting its design principles,
102
+
mathematical foundations, and benchmarks can be found
103
+
[here](https://arxiv.org/abs/2109.12298).
83
104
84
105
Consider citing the report if you use Opacus in your papers, as follows:
106
+
85
107
```
86
108
@article{opacus,
87
109
title={Opacus: {U}ser-Friendly Differential Privacy Library in {PyTorch}},
@@ -93,7 +115,8 @@ Consider citing the report if you use Opacus in your papers, as follows:
93
115
94
116
### Blogposts and talks
95
117
96
-
If you want to learn more about DP-SGD and related topics, check out our series of blogposts and talks:
118
+
If you want to learn more about DP-SGD and related topics, check out our series
119
+
of blogposts and talks:
97
120
98
121
-[Differential Privacy Series Part 1 | DP-SGD Algorithm Explained](https://medium.com/pytorch/differential-privacy-series-part-1-dp-sgd-algorithm-explained-12512c3959a3)
99
122
-[Differential Privacy Series Part 2 | Efficient Per-Sample Gradient Computation in Opacus](https://medium.com/pytorch/differential-privacy-series-part-2-efficient-per-sample-gradient-computation-in-opacus-5bf4031d9e22)
@@ -102,13 +125,19 @@ If you want to learn more about DP-SGD and related topics, check out our series
102
125
-[Opacus v1.0 Highlights | PyTorch Developer Day 2021](https://www.youtube.com/watch?v=U1mszp8lzUI)
103
126
-[Enabling Fast Gradient Clipping and Ghost Clipping in Opacus](https://pytorch.org/blog/clipping-in-opacus/)
104
127
105
-
106
128
## FAQ
107
-
Check out the [FAQ](https://opacus.ai/docs/faq) page for answers to some of the most frequently asked questions about differential privacy and Opacus.
129
+
130
+
Check out the [FAQ](https://opacus.ai/docs/faq) page for answers to some of the
131
+
most frequently asked questions about differential privacy and Opacus.
108
132
109
133
## Contributing
110
-
See the [CONTRIBUTING](https://github.com/pytorch/opacus/tree/main/CONTRIBUTING.md) file for how to help out.
111
-
Do also check out the README files inside the repo to learn how the code is organized.
0 commit comments