IAccountant¶
- class opacus.accountants.accountant.IAccountant[source]¶
- abstractmethod get_epsilon(delta, *args, **kwargs)[source]¶
Return privacy budget (epsilon) expended so far.
- get_optimizer_hook_fn(sample_rate)[source]¶
Returns a callback function which can be used to attach to DPOptimizer :type sample_rate:
float
:param sample_rate: Expected sampling rate used for accounting- Return type:
Callable
[[DPOptimizer
],None
]
- load_state_dict(state_dict)[source]¶
Validates the supplied state_dict and populates the current Privacy Accountant’s state dict.
- state_dict(destination=None)[source]¶
Returns a dictionary containing the state of the accountant. :type destination:
TypeVar
(T_state_dict
, bound=Mapping
[str
,Any
]) :param destination: a mappable object to populate the current state_dict into.If this arg is None, an OrderedDict is created and populated. Default: None