forked from 626_privacy/tensorflow_privacy
Migrate references to dp_event
to Google DP libraries.
PiperOrigin-RevId: 419663382
This commit is contained in:
parent
8d147bc9d7
commit
668afa892e
8 changed files with 15 additions and 9 deletions
|
@ -16,10 +16,12 @@
|
|||
import collections
|
||||
|
||||
import tensorflow as tf
|
||||
from tensorflow_privacy.privacy.analysis import dp_event
|
||||
|
||||
from tensorflow_privacy.privacy.dp_query import discrete_gaussian_utils
|
||||
from tensorflow_privacy.privacy.dp_query import dp_query
|
||||
|
||||
from differential_privacy.python.accounting import dp_event
|
||||
|
||||
|
||||
class DiscreteGaussianSumQuery(dp_query.SumAggregationDPQuery):
|
||||
"""Implements DPQuery for discrete Gaussian sum queries.
|
||||
|
|
|
@ -16,10 +16,11 @@
|
|||
import collections
|
||||
|
||||
import tensorflow as tf
|
||||
from tensorflow_privacy.privacy.analysis import dp_event
|
||||
from tensorflow_privacy.privacy.dp_query import discrete_gaussian_utils
|
||||
from tensorflow_privacy.privacy.dp_query import dp_query
|
||||
|
||||
from differential_privacy.python.accounting import dp_event
|
||||
|
||||
|
||||
class DistributedDiscreteGaussianSumQuery(dp_query.SumAggregationDPQuery):
|
||||
"""Implements DPQuery for discrete distributed Gaussian sum queries.
|
||||
|
|
|
@ -22,8 +22,8 @@ import distutils
|
|||
|
||||
import tensorflow.compat.v1 as tf
|
||||
|
||||
from tensorflow_privacy.privacy.analysis import dp_event
|
||||
from tensorflow_privacy.privacy.dp_query import dp_query
|
||||
from differential_privacy.python.accounting import dp_event
|
||||
|
||||
|
||||
class GaussianSumQuery(dp_query.SumAggregationDPQuery):
|
||||
|
|
|
@ -20,11 +20,11 @@ from __future__ import print_function
|
|||
import collections
|
||||
|
||||
import tensorflow.compat.v1 as tf
|
||||
|
||||
from tensorflow_privacy.privacy.analysis import dp_event
|
||||
from tensorflow_privacy.privacy.dp_query import dp_query
|
||||
import tree
|
||||
|
||||
from differential_privacy.python.accounting import dp_event
|
||||
|
||||
|
||||
class NestedQuery(dp_query.DPQuery):
|
||||
"""Implements DPQuery interface for structured queries.
|
||||
|
|
|
@ -19,8 +19,8 @@ from __future__ import print_function
|
|||
|
||||
import tensorflow.compat.v1 as tf
|
||||
|
||||
from tensorflow_privacy.privacy.analysis import dp_event
|
||||
from tensorflow_privacy.privacy.dp_query import dp_query
|
||||
from differential_privacy.python.accounting import dp_event
|
||||
|
||||
|
||||
class NoPrivacySumQuery(dp_query.SumAggregationDPQuery):
|
||||
|
|
|
@ -21,11 +21,12 @@ import collections
|
|||
|
||||
import tensorflow.compat.v1 as tf
|
||||
|
||||
from tensorflow_privacy.privacy.analysis import dp_event
|
||||
from tensorflow_privacy.privacy.dp_query import dp_query
|
||||
from tensorflow_privacy.privacy.dp_query import gaussian_query
|
||||
from tensorflow_privacy.privacy.dp_query import quantile_estimator_query
|
||||
|
||||
from differential_privacy.python.accounting import dp_event
|
||||
|
||||
|
||||
class QuantileAdaptiveClipSumQuery(dp_query.SumAggregationDPQuery):
|
||||
"""`DPQuery` for Gaussian sum queries with adaptive clipping.
|
||||
|
|
|
@ -22,10 +22,11 @@ and `tree_aggregation.EfficientTreeAggregator`.
|
|||
|
||||
import attr
|
||||
import tensorflow as tf
|
||||
from tensorflow_privacy.privacy.analysis import dp_event
|
||||
from tensorflow_privacy.privacy.dp_query import dp_query
|
||||
from tensorflow_privacy.privacy.dp_query import tree_aggregation
|
||||
|
||||
from differential_privacy.python.accounting import dp_event
|
||||
|
||||
# TODO(b/193679963): define `RestartQuery` and move `RestartIndicator` to be
|
||||
# in the same module.
|
||||
|
||||
|
|
|
@ -20,11 +20,12 @@ import math
|
|||
|
||||
import attr
|
||||
import tensorflow as tf
|
||||
from tensorflow_privacy.privacy.analysis import dp_event
|
||||
from tensorflow_privacy.privacy.dp_query import distributed_discrete_gaussian_query
|
||||
from tensorflow_privacy.privacy.dp_query import dp_query
|
||||
from tensorflow_privacy.privacy.dp_query import gaussian_query
|
||||
|
||||
from differential_privacy.python.accounting import dp_event
|
||||
|
||||
|
||||
def _build_tree_from_leaf(leaf_nodes: tf.Tensor, arity: int) -> tf.RaggedTensor:
|
||||
"""A function constructs a complete tree given all the leaf nodes.
|
||||
|
|
Loading…
Reference in a new issue