Skip to content

Commit ec4e34d

Browse files
HuanyuZhangfacebook-github-bot
authored andcommitted
Fix the doctest due to numpy 2.0 (meta-pytorch#654)
Summary: Pull Request resolved: meta-pytorch#654 Doctest fails due to numpy's upgrade into 2.0, which changes the way of printing. astropy/astropy#15095 Differential Revision: D58873298
1 parent 3619619 commit ec4e34d

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

‎opacus/accountants/analysis/rdp.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
... rdp += compute_rdp(q=q, noise_multiplier=sigma, steps=steps, orders=orders)
4040
4141
>>> epsilon, opt_order = get_privacy_spent(orders=orders, rdp=rdp, delta=1e-5)
42-
>>> epsilon, opt_order # doctest: +NUMBER
42+
>>> float(epsilon), int(opt_order) # doctest: +NUMBER
4343
(0.336, 23)
4444
4545
"""

‎requirements.txt‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
numpy>=1.15
1+
numpy>=1.15,<2.0
22
torch>=2.0
33
scipy>=1.2
44
opt-einsum>=3.3.0

0 commit comments

Comments
 (0)