Description
Right now, when we call result() after using all the privacy budget of an algorithm, the library raises C++ errors, potentially killing the Python session.
How to Reproduce
From an interactive session execute:
>>> from pydp.algorithms.laplacian import Count
>>> c = Count(1)
>>> c.add_entries([1,1,1,1,1])
>>> c.result()
4
>>> c.result()
2020-08-22 14:46:29 ERROR numerical-mechanisms.h : 118 : privacy_budget has to be in the interval (0, 1], but is 0
2020-08-22 14:46:29 ERROR numerical-mechanisms.h : 118 : privacy_budget has to be in the interval (0, 1], but is 0
-8388603
Expected Behavior
When calling result() once the privacy budget is completely used, we should raise a ValueError.
Description
Right now, when we call
result()after using all the privacy budget of an algorithm, the library raises C++ errors, potentially killing the Python session.How to Reproduce
From an interactive session execute:
Expected Behavior
When calling
result()once the privacy budget is completely used, we should raise a ValueError.