Skip to content

Commit 144bc0a

Browse files
EnayatUllahfacebook-github-bot
authored andcommitted
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
1 parent 9b78543 commit 144bc0a

File tree

1 file changed

+50
-21
lines changed

1 file changed

+50
-21
lines changed

Diff for: README.md

+50-21
Original file line numberDiff line numberDiff line change
@@ -2,40 +2,54 @@
22

33
<hr/>
44

5-
[![CircleCI](https://dl.circleci.com/status-badge/img/gh/pytorch/opacus/tree/main.svg?style=svg)](https://dl.circleci.com/status-badge/redirect/gh/pytorch/opacus/tree/main)
5+
[![GitHub Actions](https://github.com/pytorch/opacus/actions/workflows/ci_cpu.yml/badge.svg)](https://github.com/pytorch/opacus/actions/workflows/ci_cpu.yml)
66
[![Coverage Status](https://coveralls.io/repos/github/pytorch/opacus/badge.svg?branch=main)](https://coveralls.io/github/pytorch/opacus?branch=main)
77
[![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg)](CONTRIBUTING.md)
88
[![License](https://img.shields.io/badge/license-apache2-green.svg)](LICENSE)
99

10-
[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.
1214

1315

1416
## Target audience
17+
1518
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.
1819

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.
1924

2025
## Installation
26+
2127
The latest release of Opacus can be installed via `pip`:
28+
2229
```bash
2330
pip install opacus
2431
```
32+
2533
OR, alternatively, via `conda`:
34+
2635
```bash
2736
conda install -c conda-forge opacus
2837
```
2938

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+
3142
```bash
3243
git clone https://github.com/pytorch/opacus.git
3344
cd opacus
3445
pip install -e .
3546
```
3647

3748
## 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.
3953

4054
```python
4155
# define your components as usual
@@ -55,21 +69,25 @@ model, optimizer, data_loader = privacy_engine.make_private(
5569
# Now it's business as usual
5670
```
5771

58-
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.
72+
The
73+
[MNIST example](https://github.com/pytorch/opacus/tree/main/examples/mnist.py)
74+
shows an end-to-end run using Opacus. The
75+
[examples](https://github.com/pytorch/opacus/tree/main/examples/) folder
76+
contains more such examples.
5977

6078
### Migrating to 1.0
6179

62-
Opacus 1.0 introduced many improvements to the library, but also some breaking changes.
63-
If you've been using Opacus 0.x and want to update to the latest release,
64-
please use this [Migration Guide](https://github.com/pytorch/opacus/blob/main/Migration_Guide.md)
65-
80+
Opacus 1.0 introduced many improvements to the library, but also some breaking
81+
changes. If you've been using Opacus 0.x and want to update to the latest
82+
release, please use this
83+
[Migration Guide](https://github.com/pytorch/opacus/blob/main/Migration_Guide.md)
6684

6785
## Learn more
6886

6987
### Interactive tutorials
7088

71-
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.
7391

7492
- [Building an Image Classifier with Differential Privacy](https://github.com/pytorch/opacus/blob/main/tutorials/building_image_classifier.ipynb)
7593
- [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.
7997
- [Opacus Guide: Module Validator and Fixer](https://github.com/pytorch/opacus/blob/main/tutorials/guide_to_module_validator.ipynb)
8098

8199
## 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).
83104

84105
Consider citing the report if you use Opacus in your papers, as follows:
106+
85107
```
86108
@article{opacus,
87109
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:
93115

94116
### Blogposts and talks
95117

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:
97120

98121
- [Differential Privacy Series Part 1 | DP-SGD Algorithm Explained](https://medium.com/pytorch/differential-privacy-series-part-1-dp-sgd-algorithm-explained-12512c3959a3)
99122
- [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
102125
- [Opacus v1.0 Highlights | PyTorch Developer Day 2021](https://www.youtube.com/watch?v=U1mszp8lzUI)
103126
- [Enabling Fast Gradient Clipping and Ghost Clipping in Opacus](https://pytorch.org/blog/clipping-in-opacus/)
104127

105-
106128
## 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.
108132

109133
## 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.
134+
135+
See the
136+
[CONTRIBUTING](https://github.com/pytorch/opacus/tree/main/CONTRIBUTING.md) file
137+
for how to help out. Do also check out the README files inside the repo to learn
138+
how the code is organized.
112139

113140
## License
114-
This code is released under Apache 2.0, as found in the [LICENSE](https://github.com/pytorch/opacus/tree/main/LICENSE) file.
141+
142+
This code is released under Apache 2.0, as found in the
143+
[LICENSE](https://github.com/pytorch/opacus/tree/main/LICENSE) file.

0 commit comments

Comments
 (0)