• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

pytorch / opacus / 12971303704
80%

Build:
DEFAULT BRANCH: main
Ran 26 Jan 2025 04:11AM UTC
Jobs 3
Files 116
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

26 Jan 2025 01:01AM UTC coverage: 86.897% (+0.2%) from 86.711%
12971303704

push

github

facebook-github-bot
Modifying DPLossFastGradientClipping to add support for generative tasks with ghost clipping (#722)

Summary:
Pull Request resolved: https://github.com/pytorch/opacus/pull/722

Generative tasks for NLP output predictions of shape (B,T,C) i.e., (batch_size, sequence_length, vocab_size). To compute the cross-entropy loss in this case, usually the predictions are reshaped to (BxT, C) and targets to (BxT). This creates an issue with Ghost Clipping per sample loss computation as BxT is seen as the batch_size. In particular, the current implementation of Ghost Clipping results in loss_per_sample, coeff variables to have a shape of BxT and B respectively. This causes a shape mismatch error. This diff fixes that error by collapsing the loss_per_sample variable to shape B i.e., the loss across the sequence_length dim is averaged/summed.

Reviewed By: EnayatUllah

Differential Revision: D68047256

fbshipit-source-id: ad7614e2c

4 of 10 new or added lines in 1 file covered. (40.0%)

5100 of 5869 relevant lines covered (86.9%)

1.94 hits per line

New Missed Lines in Diff

Lines Coverage ∆ File
6
72.34
-10.16% opacus/utils/fast_gradient_clipping_utils.py
Jobs
ID Job ID Ran Files Coverage
1 run-2 - 12971303704.1 26 Jan 2025 04:24AM UTC 115
86.73
GitHub Action Run
2 run-3 - 12971303704.2 26 Jan 2025 04:11AM UTC 65
48.82
GitHub Action Run
3 run-1 - 12971303704.3 26 Jan 2025 04:24AM UTC 115
86.52
GitHub Action Run
Source Files on build 12971303704
  • Tree
  • List 116
  • Changed 6
  • Source Changed 1
  • Coverage Changed 6
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #12971303704
  • c7d61443 on github
  • Prev Build on main (#12943075866)
  • Next Build on main (#12981869401)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc