RdpAccountant¶
- class RdpAccountant(config: PrivacyConfig, orders: tuple[float, ...] | None = None)[소스]¶
기반 클래스:
objectTrack cumulative privacy loss using Renyi differential privacy.
This class wraps Google’s
dp-accountingpackage while exposing only Flower-owned configuration, event, result, and serialization types.메소드
compose(event[, count])Compose one or more identical sampled Gaussian releases.
get_delta(epsilon)Return cumulative delta at the supplied epsilon.
get_epsilon(delta)Return cumulative epsilon at the supplied delta.
get_privacy_spent([delta])Return cumulative privacy expenditure at delta.
load_state_dict(state)Restore state produced by
state_dict().Return JSON-serializable accountant state.
would_exceed(event[, max_epsilon, count])Return whether composing an event would exceed an epsilon limit.
속성
Return the privacy configuration.
Return the number of composed private releases.
- compose(event: GaussianPrivacyEvent, count: int = 1) None[소스]¶
Compose one or more identical sampled Gaussian releases.
- property config: PrivacyConfig¶
Return the privacy configuration.
- get_privacy_spent(delta: float | None = None) PrivacySpent[소스]¶
Return cumulative privacy expenditure at delta.
- load_state_dict(state: dict[str, object]) None[소스]¶
Restore state produced by
state_dict().The restored state must use the same privacy configuration as this accountant. Backend numeric state is rebuilt from Flower’s event ledger.
- property num_releases: int¶
Return the number of composed private releases.
- would_exceed(event: GaussianPrivacyEvent, max_epsilon: float | None = None, count: int = 1) bool[소스]¶
Return whether composing an event would exceed an epsilon limit.
This method does not mutate committed accountant state.