Skip to content

Commit

Permalink
Fix the doctest due to numpy 2.0 (#654)
Browse files Browse the repository at this point in the history
Summary:
Pull Request resolved: #654

Doctest fails due to numpy's upgrade into 2.0, which changes the way of printing.
astropy/astropy#15095

Reviewed By: EnayatUllah

Differential Revision: D58873298

fbshipit-source-id: 5c4a21ff590c70b9643a1d921bc32b258e215616
  • Loading branch information
HuanyuZhang authored and facebook-github-bot committed Jun 27, 2024
1 parent 3619619 commit 1235e1e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion opacus/accountants/analysis/rdp.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
... rdp += compute_rdp(q=q, noise_multiplier=sigma, steps=steps, orders=orders)
>>> epsilon, opt_order = get_privacy_spent(orders=orders, rdp=rdp, delta=1e-5)
>>> epsilon, opt_order # doctest: +NUMBER
>>> float(epsilon), int(opt_order) # doctest: +NUMBER
(0.336, 23)
"""
Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
numpy>=1.15
numpy>=1.15,<2.0
torch>=2.0
scipy>=1.2
opt-einsum>=3.3.0

0 comments on commit 1235e1e

Please sign in to comment.