privacy icon indicating copy to clipboard operation
privacy copied to clipboard

from tensorflow_privacy.privacy.analysis import privacy_ledger

Open Turningl opened this issue 3 years ago • 3 comments

ImportError: cannot import name 'privacy_ledger' from 'tensorflow_privacy.privacy.analysis' (C:\miniconda3\envs\tensorflow-gpu\lib\site-packages\tensorflow_privacy\privacy\analysis_init_.py)

Turningl avatar Dec 29 '22 14:12 Turningl

same issue here. may I ask did you slove it?

lesleychou avatar Feb 15 '23 19:02 lesleychou

privacy_ledger was deprecated and removed from tensorflow_privacy. Please use the functions in https://github.com/google/differential-privacy/tree/main/python/dp_accounting for accounting.

galenmandrew avatar Feb 15 '23 20:02 galenmandrew

Thanks for the quick reply!

Actually I was trying to use privacy_ledger because of another error: AssertionError: compute_gradients() on the differentially private optimizer was not called. Which means that the training is not differentially private. It happens for example in Keras training in TensorFlow 2.0+.

I checked all of the related issues but still couldn't solve the above. Any idea on how I can avoid this error? Thanks again!

lesleychou avatar Feb 15 '23 20:02 lesleychou