From d75f1b80ba393162342f8227ce6f3c8da0c14438 Mon Sep 17 00:00:00 2001 From: Steve Chien Date: Fri, 8 Feb 2019 16:55:29 -0800 Subject: [PATCH] Fix copybara to limit some transformations to the beginning of the line. PiperOrigin-RevId: 233151293 --- privacy/analysis/compute_dp_sgd_privacy.py | 4 ++-- privacy/analysis/privacy_ledger.py | 4 ++-- privacy/analysis/privacy_ledger_test.py | 8 ++++---- privacy/analysis/rdp_accountant_test.py | 2 +- privacy/analysis/tensor_buffer_test.py | 2 +- privacy/optimizers/dp_optimizer.py | 4 ++-- privacy/optimizers/dp_optimizer_test.py | 6 +++--- privacy/optimizers/gaussian_query.py | 2 +- privacy/optimizers/gaussian_query_test.py | 4 ++-- privacy/optimizers/nested_query.py | 2 +- privacy/optimizers/nested_query_test.py | 6 +++--- privacy/optimizers/no_privacy_query.py | 2 +- privacy/optimizers/no_privacy_query_test.py | 4 ++-- tutorials/mnist_dpsgd_tutorial.py | 6 +++--- 14 files changed, 28 insertions(+), 28 deletions(-) diff --git a/privacy/analysis/compute_dp_sgd_privacy.py b/privacy/analysis/compute_dp_sgd_privacy.py index 04408e8..e2d8fbd 100644 --- a/privacy/analysis/compute_dp_sgd_privacy.py +++ b/privacy/analysis/compute_dp_sgd_privacy.py @@ -37,8 +37,8 @@ import math from absl import app from absl import flags -from tensorflow_privacy.privacy.analysis.rdp_accountant import compute_rdp -from tensorflow_privacy.privacy.analysis.rdp_accountant import get_privacy_spent +from privacy.analysis.rdp_accountant import compute_rdp +from privacy.analysis.rdp_accountant import get_privacy_spent FLAGS = flags.FLAGS diff --git a/privacy/analysis/privacy_ledger.py b/privacy/analysis/privacy_ledger.py index 1062e08..e1b0d30 100644 --- a/privacy/analysis/privacy_ledger.py +++ b/privacy/analysis/privacy_ledger.py @@ -23,8 +23,8 @@ import collections import tensorflow as tf -from tensorflow_privacy.privacy.analysis import tensor_buffer -from tensorflow_privacy.privacy.optimizers import dp_query +from privacy.analysis import tensor_buffer +from privacy.optimizers import dp_query nest = tf.contrib.framework.nest diff --git a/privacy/analysis/privacy_ledger_test.py b/privacy/analysis/privacy_ledger_test.py index 48911a7..c50d29c 100644 --- a/privacy/analysis/privacy_ledger_test.py +++ b/privacy/analysis/privacy_ledger_test.py @@ -20,10 +20,10 @@ from __future__ import print_function import tensorflow as tf -from tensorflow_privacy.privacy.analysis import privacy_ledger -from tensorflow_privacy.privacy.optimizers import gaussian_query -from tensorflow_privacy.privacy.optimizers import nested_query -from tensorflow_privacy.privacy.optimizers import test_utils +from privacy.analysis import privacy_ledger +from privacy.optimizers import gaussian_query +from privacy.optimizers import nested_query +from privacy.optimizers import test_utils tf.enable_eager_execution() diff --git a/privacy/analysis/rdp_accountant_test.py b/privacy/analysis/rdp_accountant_test.py index 1237129..79cb797 100644 --- a/privacy/analysis/rdp_accountant_test.py +++ b/privacy/analysis/rdp_accountant_test.py @@ -25,7 +25,7 @@ from absl.testing import parameterized import mpmath as mp import numpy as np -from tensorflow_privacy.privacy.analysis import rdp_accountant +from privacy.analysis import rdp_accountant class TestGaussianMoments(parameterized.TestCase): diff --git a/privacy/analysis/tensor_buffer_test.py b/privacy/analysis/tensor_buffer_test.py index b2752c1..31acb5f 100644 --- a/privacy/analysis/tensor_buffer_test.py +++ b/privacy/analysis/tensor_buffer_test.py @@ -19,7 +19,7 @@ from __future__ import print_function import tensorflow as tf -from tensorflow_privacy.privacy.analysis import tensor_buffer +from privacy.analysis import tensor_buffer tf.enable_eager_execution() diff --git a/privacy/optimizers/dp_optimizer.py b/privacy/optimizers/dp_optimizer.py index f2bc699..40016d6 100644 --- a/privacy/optimizers/dp_optimizer.py +++ b/privacy/optimizers/dp_optimizer.py @@ -19,8 +19,8 @@ from __future__ import print_function import tensorflow as tf -from tensorflow_privacy.privacy.analysis import privacy_ledger -from tensorflow_privacy.privacy.optimizers import gaussian_query +from privacy.analysis import privacy_ledger +from privacy.optimizers import gaussian_query def make_optimizer_class(cls): diff --git a/privacy/optimizers/dp_optimizer_test.py b/privacy/optimizers/dp_optimizer_test.py index 2413b92..cb3c235 100644 --- a/privacy/optimizers/dp_optimizer_test.py +++ b/privacy/optimizers/dp_optimizer_test.py @@ -22,9 +22,9 @@ import mock import numpy as np import tensorflow as tf -from tensorflow_privacy.privacy.analysis import privacy_ledger -from tensorflow_privacy.privacy.optimizers import dp_optimizer -from tensorflow_privacy.privacy.optimizers import gaussian_query +from privacy.analysis import privacy_ledger +from privacy.optimizers import dp_optimizer +from privacy.optimizers import gaussian_query def loss(val0, val1): diff --git a/privacy/optimizers/gaussian_query.py b/privacy/optimizers/gaussian_query.py index 5d9dd8c..3df8cbf 100644 --- a/privacy/optimizers/gaussian_query.py +++ b/privacy/optimizers/gaussian_query.py @@ -23,7 +23,7 @@ import collections import tensorflow as tf -from tensorflow_privacy.privacy.optimizers import dp_query +from privacy.optimizers import dp_query nest = tf.contrib.framework.nest diff --git a/privacy/optimizers/gaussian_query_test.py b/privacy/optimizers/gaussian_query_test.py index 0f2ee51..7b5be7f 100644 --- a/privacy/optimizers/gaussian_query_test.py +++ b/privacy/optimizers/gaussian_query_test.py @@ -22,8 +22,8 @@ from absl.testing import parameterized import numpy as np import tensorflow as tf -from tensorflow_privacy.privacy.optimizers import gaussian_query -from tensorflow_privacy.privacy.optimizers import test_utils +from privacy.optimizers import gaussian_query +from privacy.optimizers import test_utils class GaussianQueryTest(tf.test.TestCase, parameterized.TestCase): diff --git a/privacy/optimizers/nested_query.py b/privacy/optimizers/nested_query.py index 748556c..6aa4154 100644 --- a/privacy/optimizers/nested_query.py +++ b/privacy/optimizers/nested_query.py @@ -22,7 +22,7 @@ from __future__ import print_function import tensorflow as tf -from tensorflow_privacy.privacy.optimizers import dp_query +from privacy.optimizers import dp_query nest = tf.contrib.framework.nest diff --git a/privacy/optimizers/nested_query_test.py b/privacy/optimizers/nested_query_test.py index ba49c8c..c9f0b24 100644 --- a/privacy/optimizers/nested_query_test.py +++ b/privacy/optimizers/nested_query_test.py @@ -23,9 +23,9 @@ from absl.testing import parameterized import numpy as np import tensorflow as tf -from tensorflow_privacy.privacy.optimizers import gaussian_query -from tensorflow_privacy.privacy.optimizers import nested_query -from tensorflow_privacy.privacy.optimizers import test_utils +from privacy.optimizers import gaussian_query +from privacy.optimizers import nested_query +from privacy.optimizers import test_utils nest = tf.contrib.framework.nest diff --git a/privacy/optimizers/no_privacy_query.py b/privacy/optimizers/no_privacy_query.py index ea35caf..d53e88a 100644 --- a/privacy/optimizers/no_privacy_query.py +++ b/privacy/optimizers/no_privacy_query.py @@ -19,7 +19,7 @@ from __future__ import print_function import tensorflow as tf -from tensorflow_privacy.privacy.optimizers import dp_query +from privacy.optimizers import dp_query nest = tf.contrib.framework.nest diff --git a/privacy/optimizers/no_privacy_query_test.py b/privacy/optimizers/no_privacy_query_test.py index 45a2fa9..5da0753 100644 --- a/privacy/optimizers/no_privacy_query_test.py +++ b/privacy/optimizers/no_privacy_query_test.py @@ -21,8 +21,8 @@ from __future__ import print_function from absl.testing import parameterized import tensorflow as tf -from tensorflow_privacy.privacy.optimizers import no_privacy_query -from tensorflow_privacy.privacy.optimizers import test_utils +from privacy.optimizers import no_privacy_query +from privacy.optimizers import test_utils class NoPrivacyQueryTest(tf.test.TestCase, parameterized.TestCase): diff --git a/tutorials/mnist_dpsgd_tutorial.py b/tutorials/mnist_dpsgd_tutorial.py index 0162c78..3cb288d 100644 --- a/tutorials/mnist_dpsgd_tutorial.py +++ b/tutorials/mnist_dpsgd_tutorial.py @@ -21,9 +21,9 @@ from __future__ import print_function import numpy as np import tensorflow as tf -from tensorflow_privacy.privacy.analysis.rdp_accountant import compute_rdp -from tensorflow_privacy.privacy.analysis.rdp_accountant import get_privacy_spent -from tensorflow_privacy.privacy.optimizers import dp_optimizer +from privacy.analysis.rdp_accountant import compute_rdp +from privacy.analysis.rdp_accountant import get_privacy_spent +from privacy.optimizers import dp_optimizer tf.flags.DEFINE_boolean('dpsgd', True, 'If True, train with DP-SGD. If False, ' 'train with vanilla SGD.')