Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add *kwargs to get_epsilon #704

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion opacus/accountants/gdp.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ def step(self, *, noise_multiplier: float, sample_rate: float):
else:
self.history = [(noise_multiplier, sample_rate, 1)]

def get_epsilon(self, delta: float, poisson: bool = True) -> float:
def get_epsilon(self, delta: float, poisson: bool = True, **kwargs) -> float:
"""
Return privacy budget (epsilon) expended so far.
Expand Down
7 changes: 6 additions & 1 deletion opacus/accountants/prv.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,12 @@ def step(self, *, noise_multiplier: float, sample_rate: float):
self.history.append((noise_multiplier, sample_rate, 1))

def get_epsilon(
self, delta: float, *, eps_error: float = 0.01, delta_error: float = None
self,
delta: float,
*,
eps_error: float = 0.01,
delta_error: float = None,
**kwargs,
) -> float:
"""
Return privacy budget (epsilon) expended so far.
Expand Down
5 changes: 4 additions & 1 deletion opacus/accountants/rdp.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,10 @@ def get_privacy_spent(
return float(eps), float(best_alpha)

def get_epsilon(
self, delta: float, alphas: Optional[List[Union[float, int]]] = None
self,
delta: float,
alphas: Optional[List[Union[float, int]]] = None,
**kwargs,
):
"""
Return privacy budget (epsilon) expended so far.
Expand Down
Loading