google / differential-privacy

Google's differential privacy libraries.
Apache License 2.0
3.07k stars 346 forks source link

When `epsilon==0`, `PrivacyLossDistribution.from_privacy_parameters()` fails. #110

Closed ngrislain closed 2 years ago

ngrislain commented 2 years ago

If epsilon==0 (or small compared to value_discretization_interval) then rounded_probability_mass_function is assigned a dict with twice the same key, so the second will overwrite the first (python should probably not silently do that).

https://github.com/google/differential-privacy/blob/fc4f2abda5052f654539fc1282ed64a827465a70/python/dp_accounting/privacy_loss_distribution.py#L582-L587

dasmdasm commented 2 years ago

Our commit last week should have resolved this.