pytorch / opacus

Training PyTorch models with differential privacy
https://opacus.ai
Apache License 2.0
1.65k stars 328 forks source link

'PRVAccountant' object has no attribute 'get_privacy_spent' in Opacus code. Any solution please #562

Closed Hafizamariaiqbal closed 1 year ago

Hafizamariaiqbal commented 1 year ago

🐛 Bug

Please reproduce using our template Colab and post here the link

To Reproduce

:warning: We cannot help you without you sharing reproducible code. Do not ignore this part :) Steps to reproduce the behavior:

1. 2. 3.

Expected behavior

Environment

Please copy and paste the output from our environment collection script (or fill out the checklist below manually).

You can get the script and run it with:

wget https://raw.githubusercontent.com/pytorch/pytorch/master/torch/utils/collect_env.py
# For security purposes, please check the contents of collect_env.py before running it.
python collect_env.py

Additional context

lucacorbucci commented 1 year ago

Hi, I had the same problem. I replaced "get_privacy_spent" with "get_epsilon". I found this reading the PRVAccountant code https://github.com/pytorch/opacus/blob/a0a31baacc98b5d43e514f034ab2ee65bade9d39/opacus/accountants/prv.py

Hafizamariaiqbal commented 1 year ago

Hi, I had the same problem. I replaced "get_privacy_spent" with "get_epsilon". I found this reading the PRVAccountant code https://github.com/pytorch/opacus/blob/a0a31baacc98b5d43e514f034ab2ee65bade9d39/opacus/accountants/prv.py

Thank you for your help. Yes by changing this line code is working fine. can you please help me to represent results into a graph form??

alexandresablayrolles commented 1 year ago

Closing as a duplicate of #560