diff --git a/tensorflow_privacy/privacy/dp_query/discrete_gaussian_query.py b/tensorflow_privacy/privacy/dp_query/discrete_gaussian_query.py index 2b3db5d..6797b6a 100644 --- a/tensorflow_privacy/privacy/dp_query/discrete_gaussian_query.py +++ b/tensorflow_privacy/privacy/dp_query/discrete_gaussian_query.py @@ -16,12 +16,10 @@ 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. diff --git a/tensorflow_privacy/privacy/dp_query/distributed_discrete_gaussian_query.py b/tensorflow_privacy/privacy/dp_query/distributed_discrete_gaussian_query.py index e4d9559..30031f6 100644 --- a/tensorflow_privacy/privacy/dp_query/distributed_discrete_gaussian_query.py +++ b/tensorflow_privacy/privacy/dp_query/distributed_discrete_gaussian_query.py @@ -16,11 +16,10 @@ 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. diff --git a/tensorflow_privacy/privacy/dp_query/gaussian_query.py b/tensorflow_privacy/privacy/dp_query/gaussian_query.py index e600613..3edd2fb 100644 --- a/tensorflow_privacy/privacy/dp_query/gaussian_query.py +++ b/tensorflow_privacy/privacy/dp_query/gaussian_query.py @@ -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): diff --git a/tensorflow_privacy/privacy/dp_query/nested_query.py b/tensorflow_privacy/privacy/dp_query/nested_query.py index 2c4053a..b4e2247 100644 --- a/tensorflow_privacy/privacy/dp_query/nested_query.py +++ b/tensorflow_privacy/privacy/dp_query/nested_query.py @@ -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. diff --git a/tensorflow_privacy/privacy/dp_query/no_privacy_query.py b/tensorflow_privacy/privacy/dp_query/no_privacy_query.py index c1837a0..3840003 100644 --- a/tensorflow_privacy/privacy/dp_query/no_privacy_query.py +++ b/tensorflow_privacy/privacy/dp_query/no_privacy_query.py @@ -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): diff --git a/tensorflow_privacy/privacy/dp_query/quantile_adaptive_clip_sum_query.py b/tensorflow_privacy/privacy/dp_query/quantile_adaptive_clip_sum_query.py index 94a2f98..15a8b36 100644 --- a/tensorflow_privacy/privacy/dp_query/quantile_adaptive_clip_sum_query.py +++ b/tensorflow_privacy/privacy/dp_query/quantile_adaptive_clip_sum_query.py @@ -21,12 +21,11 @@ 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. diff --git a/tensorflow_privacy/privacy/dp_query/tree_aggregation_query.py b/tensorflow_privacy/privacy/dp_query/tree_aggregation_query.py index 4cceeb4..70f9efa 100644 --- a/tensorflow_privacy/privacy/dp_query/tree_aggregation_query.py +++ b/tensorflow_privacy/privacy/dp_query/tree_aggregation_query.py @@ -22,11 +22,10 @@ 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. diff --git a/tensorflow_privacy/privacy/dp_query/tree_range_query.py b/tensorflow_privacy/privacy/dp_query/tree_range_query.py index 2a4a984..471915b 100644 --- a/tensorflow_privacy/privacy/dp_query/tree_range_query.py +++ b/tensorflow_privacy/privacy/dp_query/tree_range_query.py @@ -20,12 +20,11 @@ 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.