diff --git a/tensorflow/compiler/mlir/lite/tests/debuginfo/concrete_function_error.py b/tensorflow/compiler/mlir/lite/tests/debuginfo/concrete_function_error.py index 0bb386f4829..7fe587095b6 100644 --- a/tensorflow/compiler/mlir/lite/tests/debuginfo/concrete_function_error.py +++ b/tensorflow/compiler/mlir/lite/tests/debuginfo/concrete_function_error.py @@ -21,6 +21,7 @@ from __future__ import division from __future__ import print_function import sys + from absl import app import tensorflow.compat.v2 as tf diff --git a/tensorflow/compiler/mlir/lite/tests/debuginfo/saved_model_error.py b/tensorflow/compiler/mlir/lite/tests/debuginfo/saved_model_error.py index a4011226f14..fa35d229bc4 100644 --- a/tensorflow/compiler/mlir/lite/tests/debuginfo/saved_model_error.py +++ b/tensorflow/compiler/mlir/lite/tests/debuginfo/saved_model_error.py @@ -21,6 +21,7 @@ from __future__ import division from __future__ import print_function import sys + from absl import app import tensorflow.compat.v2 as tf diff --git a/tensorflow/compiler/mlir/tensorflow/tests/tf_saved_model/common.py b/tensorflow/compiler/mlir/tensorflow/tests/tf_saved_model/common.py index 67725236f07..fd8221cd190 100644 --- a/tensorflow/compiler/mlir/tensorflow/tests/tf_saved_model/common.py +++ b/tensorflow/compiler/mlir/tensorflow/tests/tf_saved_model/common.py @@ -23,6 +23,7 @@ from __future__ import division from __future__ import print_function import tempfile + from absl import app from absl import flags from absl import logging diff --git a/tensorflow/compiler/tests/dense_layer_test.py b/tensorflow/compiler/tests/dense_layer_test.py index 8020aa28ce4..8e653d2511c 100644 --- a/tensorflow/compiler/tests/dense_layer_test.py +++ b/tensorflow/compiler/tests/dense_layer_test.py @@ -19,6 +19,7 @@ from __future__ import division from __future__ import print_function import os + import numpy as np from tensorflow.compiler.tests import test_utils diff --git a/tensorflow/compiler/tests/jit_test.py b/tensorflow/compiler/tests/jit_test.py index 109a7932c20..3bde1574f0e 100644 --- a/tensorflow/compiler/tests/jit_test.py +++ b/tensorflow/compiler/tests/jit_test.py @@ -19,6 +19,7 @@ from __future__ import division from __future__ import print_function import os + import numpy as np from tensorflow.compiler.tests import test_utils diff --git a/tensorflow/compiler/tests/quantized_ops_test.py b/tensorflow/compiler/tests/quantized_ops_test.py index 100be3b9aa5..5d4fb39f2ea 100644 --- a/tensorflow/compiler/tests/quantized_ops_test.py +++ b/tensorflow/compiler/tests/quantized_ops_test.py @@ -19,6 +19,7 @@ from __future__ import division from __future__ import print_function import math + import numpy as np from tensorflow.compiler.tests import xla_test diff --git a/tensorflow/compiler/tests/reduce_ops_test.py b/tensorflow/compiler/tests/reduce_ops_test.py index a39f633858a..57709c2cd10 100644 --- a/tensorflow/compiler/tests/reduce_ops_test.py +++ b/tensorflow/compiler/tests/reduce_ops_test.py @@ -20,6 +20,7 @@ from __future__ import print_function import functools import itertools + from absl.testing import parameterized import numpy as np diff --git a/tensorflow/compiler/tests/reverse_ops_test.py b/tensorflow/compiler/tests/reverse_ops_test.py index 7dc323b0ab5..abfb73ade38 100644 --- a/tensorflow/compiler/tests/reverse_ops_test.py +++ b/tensorflow/compiler/tests/reverse_ops_test.py @@ -19,6 +19,7 @@ from __future__ import division from __future__ import print_function import itertools + import numpy as np from tensorflow.compiler.tests import xla_test diff --git a/tensorflow/compiler/tests/segment_reduction_ops_test.py b/tensorflow/compiler/tests/segment_reduction_ops_test.py index 500617bc38b..ae86b6c30da 100644 --- a/tensorflow/compiler/tests/segment_reduction_ops_test.py +++ b/tensorflow/compiler/tests/segment_reduction_ops_test.py @@ -19,6 +19,7 @@ from __future__ import division from __future__ import print_function import functools + import numpy as np from tensorflow.compiler.tests import xla_test diff --git a/tensorflow/compiler/tests/self_adjoint_eig_op_test.py b/tensorflow/compiler/tests/self_adjoint_eig_op_test.py index 0c1a1d145d4..9507a8c9c92 100644 --- a/tensorflow/compiler/tests/self_adjoint_eig_op_test.py +++ b/tensorflow/compiler/tests/self_adjoint_eig_op_test.py @@ -19,6 +19,7 @@ from __future__ import division from __future__ import print_function import itertools + from absl.testing import parameterized import numpy as np diff --git a/tensorflow/compiler/tests/svd_op_test.py b/tensorflow/compiler/tests/svd_op_test.py index 7791b409a37..7e05eeb4c0a 100644 --- a/tensorflow/compiler/tests/svd_op_test.py +++ b/tensorflow/compiler/tests/svd_op_test.py @@ -19,6 +19,7 @@ from __future__ import division from __future__ import print_function import itertools + from absl.testing import parameterized import numpy as np diff --git a/tensorflow/compiler/tests/tensor_list_ops_test.py b/tensorflow/compiler/tests/tensor_list_ops_test.py index 7d2425ee205..d49a6a37785 100644 --- a/tensorflow/compiler/tests/tensor_list_ops_test.py +++ b/tensorflow/compiler/tests/tensor_list_ops_test.py @@ -19,6 +19,7 @@ from __future__ import absolute_import from __future__ import division from __future__ import print_function import os + from absl.testing import parameterized import numpy as np from tensorflow.compiler.tests import xla_test diff --git a/tensorflow/compiler/tests/while_test.py b/tensorflow/compiler/tests/while_test.py index 3ef12ced704..420dc04bec3 100644 --- a/tensorflow/compiler/tests/while_test.py +++ b/tensorflow/compiler/tests/while_test.py @@ -19,6 +19,7 @@ from __future__ import division from __future__ import print_function import os + import numpy as np from tensorflow.compiler.tests import xla_test diff --git a/tensorflow/examples/saved_model/integration_tests/export_simple_text_embedding.py b/tensorflow/examples/saved_model/integration_tests/export_simple_text_embedding.py index 444af7c9d8b..a90d90d4373 100644 --- a/tensorflow/examples/saved_model/integration_tests/export_simple_text_embedding.py +++ b/tensorflow/examples/saved_model/integration_tests/export_simple_text_embedding.py @@ -20,6 +20,7 @@ from __future__ import print_function import os import tempfile + from absl import app from absl import flags diff --git a/tensorflow/examples/saved_model/integration_tests/use_model_in_sequential_keras.py b/tensorflow/examples/saved_model/integration_tests/use_model_in_sequential_keras.py index 9fccc9ce472..47a10fbb608 100644 --- a/tensorflow/examples/saved_model/integration_tests/use_model_in_sequential_keras.py +++ b/tensorflow/examples/saved_model/integration_tests/use_model_in_sequential_keras.py @@ -19,6 +19,7 @@ from __future__ import division from __future__ import print_function import tempfile + from absl import app from absl import flags diff --git a/tensorflow/examples/saved_model/integration_tests/use_rnn_cell.py b/tensorflow/examples/saved_model/integration_tests/use_rnn_cell.py index 8a0173c8aa7..2caca306cac 100644 --- a/tensorflow/examples/saved_model/integration_tests/use_rnn_cell.py +++ b/tensorflow/examples/saved_model/integration_tests/use_rnn_cell.py @@ -19,6 +19,7 @@ from __future__ import division from __future__ import print_function import tempfile + from absl import app from absl import flags import numpy as np diff --git a/tensorflow/examples/saved_model/integration_tests/use_text_embedding_in_dataset.py b/tensorflow/examples/saved_model/integration_tests/use_text_embedding_in_dataset.py index b22102b90d3..be147a86d4c 100644 --- a/tensorflow/examples/saved_model/integration_tests/use_text_embedding_in_dataset.py +++ b/tensorflow/examples/saved_model/integration_tests/use_text_embedding_in_dataset.py @@ -19,6 +19,7 @@ from __future__ import division from __future__ import print_function import tempfile + from absl import app from absl import flags diff --git a/tensorflow/examples/saved_model/integration_tests/use_text_rnn_model.py b/tensorflow/examples/saved_model/integration_tests/use_text_rnn_model.py index ad7dea6ed6e..a3c0f230976 100644 --- a/tensorflow/examples/saved_model/integration_tests/use_text_rnn_model.py +++ b/tensorflow/examples/saved_model/integration_tests/use_text_rnn_model.py @@ -19,6 +19,7 @@ from __future__ import division from __future__ import print_function import tempfile + from absl import app from absl import flags import tensorflow.compat.v2 as tf diff --git a/tensorflow/python/__init__.py b/tensorflow/python/__init__.py index 7ba4d4278fc..97eb7111fa5 100644 --- a/tensorflow/python/__init__.py +++ b/tensorflow/python/__init__.py @@ -21,6 +21,7 @@ from __future__ import absolute_import from __future__ import division from __future__ import print_function + import tensorflow as tf """ diff --git a/tensorflow/python/compiler/tensorrt/test/tf_trt_integration_test_base.py b/tensorflow/python/compiler/tensorrt/test/tf_trt_integration_test_base.py index 8bd5e019d34..f4ef27ac20d 100644 --- a/tensorflow/python/compiler/tensorrt/test/tf_trt_integration_test_base.py +++ b/tensorflow/python/compiler/tensorrt/test/tf_trt_integration_test_base.py @@ -27,6 +27,7 @@ import re import shutil import tempfile import warnings + import numpy as np import six diff --git a/tensorflow/python/compiler/tensorrt/trt_convert_test.py b/tensorflow/python/compiler/tensorrt/trt_convert_test.py index d6e43121f10..f168ee2f3be 100644 --- a/tensorflow/python/compiler/tensorrt/trt_convert_test.py +++ b/tensorflow/python/compiler/tensorrt/trt_convert_test.py @@ -21,6 +21,7 @@ from __future__ import print_function import gc import os import tempfile + from absl.testing import parameterized import numpy as np diff --git a/tensorflow/python/compiler/xla/xla.py b/tensorflow/python/compiler/xla/xla.py index 110ebbb367d..622fadfba8a 100644 --- a/tensorflow/python/compiler/xla/xla.py +++ b/tensorflow/python/compiler/xla/xla.py @@ -20,6 +20,7 @@ from __future__ import print_function import collections import contextlib + from six.moves import xrange # pylint: disable=redefined-builtin from tensorflow.compiler.jit.ops import xla_ops diff --git a/tensorflow/python/data/benchmarks/benchmark_base.py b/tensorflow/python/data/benchmarks/benchmark_base.py index 85c894551f1..40a8c61556a 100644 --- a/tensorflow/python/data/benchmarks/benchmark_base.py +++ b/tensorflow/python/data/benchmarks/benchmark_base.py @@ -18,6 +18,7 @@ from __future__ import division from __future__ import print_function import time + import numpy as np from tensorflow.python.client import session diff --git a/tensorflow/python/data/benchmarks/meta_benchmark.py b/tensorflow/python/data/benchmarks/meta_benchmark.py index 7a699a5b22a..ed336e73708 100644 --- a/tensorflow/python/data/benchmarks/meta_benchmark.py +++ b/tensorflow/python/data/benchmarks/meta_benchmark.py @@ -18,6 +18,7 @@ from __future__ import division from __future__ import print_function import timeit + import numpy as np from tensorflow.python.client import session diff --git a/tensorflow/python/data/kernel_tests/as_numpy_iterator_test.py b/tensorflow/python/data/kernel_tests/as_numpy_iterator_test.py index b704906a3ae..ea80389b0a5 100644 --- a/tensorflow/python/data/kernel_tests/as_numpy_iterator_test.py +++ b/tensorflow/python/data/kernel_tests/as_numpy_iterator_test.py @@ -18,6 +18,7 @@ from __future__ import division from __future__ import print_function import collections + from absl.testing import parameterized import numpy as np diff --git a/tensorflow/python/data/kernel_tests/fixed_length_record_dataset_test.py b/tensorflow/python/data/kernel_tests/fixed_length_record_dataset_test.py index a4e34a5bb18..9caf1177ae9 100644 --- a/tensorflow/python/data/kernel_tests/fixed_length_record_dataset_test.py +++ b/tensorflow/python/data/kernel_tests/fixed_length_record_dataset_test.py @@ -20,6 +20,7 @@ from __future__ import print_function import gzip import os import zlib + from absl.testing import parameterized from tensorflow.python.data.kernel_tests import test_base diff --git a/tensorflow/python/data/kernel_tests/memory_cleanup_test.py b/tensorflow/python/data/kernel_tests/memory_cleanup_test.py index 5b0ea02a054..4917d6ec163 100644 --- a/tensorflow/python/data/kernel_tests/memory_cleanup_test.py +++ b/tensorflow/python/data/kernel_tests/memory_cleanup_test.py @@ -20,6 +20,7 @@ from __future__ import print_function import gc import time + from absl.testing import parameterized import six diff --git a/tensorflow/python/data/kernel_tests/unbatch_test.py b/tensorflow/python/data/kernel_tests/unbatch_test.py index 44d949385b0..b16d5b28648 100644 --- a/tensorflow/python/data/kernel_tests/unbatch_test.py +++ b/tensorflow/python/data/kernel_tests/unbatch_test.py @@ -17,7 +17,6 @@ from __future__ import absolute_import from __future__ import division from __future__ import print_function - from absl.testing import parameterized import numpy as np diff --git a/tensorflow/python/distribute/checkpoint_utils_test.py b/tensorflow/python/distribute/checkpoint_utils_test.py index 9648d860bbd..97c4eeb536c 100644 --- a/tensorflow/python/distribute/checkpoint_utils_test.py +++ b/tensorflow/python/distribute/checkpoint_utils_test.py @@ -26,6 +26,7 @@ from __future__ import division from __future__ import print_function import os + from absl.testing import parameterized from tensorflow.python.distribute import combinations diff --git a/tensorflow/python/distribute/cluster_resolver/cluster_resolver.py b/tensorflow/python/distribute/cluster_resolver/cluster_resolver.py index 1cafbcee93a..e15b6ab01f8 100644 --- a/tensorflow/python/distribute/cluster_resolver/cluster_resolver.py +++ b/tensorflow/python/distribute/cluster_resolver/cluster_resolver.py @@ -21,6 +21,7 @@ from __future__ import print_function import abc import collections + import six from tensorflow.python.client import session diff --git a/tensorflow/python/distribute/cross_device_ops.py b/tensorflow/python/distribute/cross_device_ops.py index 8e05a802758..e6cd40cad6f 100644 --- a/tensorflow/python/distribute/cross_device_ops.py +++ b/tensorflow/python/distribute/cross_device_ops.py @@ -20,6 +20,7 @@ from __future__ import print_function import collections import enum + import six from tensorflow.python.client import device_lib diff --git a/tensorflow/python/distribute/ctl_correctness_test.py b/tensorflow/python/distribute/ctl_correctness_test.py index df79c7a8b9a..f942d3bb173 100644 --- a/tensorflow/python/distribute/ctl_correctness_test.py +++ b/tensorflow/python/distribute/ctl_correctness_test.py @@ -18,6 +18,7 @@ from __future__ import absolute_import from __future__ import division from __future__ import print_function + from absl.testing import parameterized import numpy as np from tensorflow.python import keras diff --git a/tensorflow/python/distribute/distribute_coordinator_test.py b/tensorflow/python/distribute/distribute_coordinator_test.py index eb8daa76d36..3e4d2e09253 100644 --- a/tensorflow/python/distribute/distribute_coordinator_test.py +++ b/tensorflow/python/distribute/distribute_coordinator_test.py @@ -25,6 +25,7 @@ import os import sys import threading import time + import six _portpicker_import_error = None diff --git a/tensorflow/python/distribute/input_lib_test.py b/tensorflow/python/distribute/input_lib_test.py index 2ebc6c20669..ea02ba8f1ac 100644 --- a/tensorflow/python/distribute/input_lib_test.py +++ b/tensorflow/python/distribute/input_lib_test.py @@ -21,6 +21,7 @@ from __future__ import print_function import collections import json import threading + from absl.testing import parameterized import numpy as np diff --git a/tensorflow/python/distribute/multi_worker_continuous_run_test.py b/tensorflow/python/distribute/multi_worker_continuous_run_test.py index cca0ef91a5a..9e406e846b8 100644 --- a/tensorflow/python/distribute/multi_worker_continuous_run_test.py +++ b/tensorflow/python/distribute/multi_worker_continuous_run_test.py @@ -20,6 +20,7 @@ from __future__ import print_function import json import os + from absl.testing import parameterized import numpy as np diff --git a/tensorflow/python/distribute/multi_worker_test_base.py b/tensorflow/python/distribute/multi_worker_test_base.py index 863a7d7b652..184baf7a1dc 100644 --- a/tensorflow/python/distribute/multi_worker_test_base.py +++ b/tensorflow/python/distribute/multi_worker_test_base.py @@ -26,6 +26,7 @@ import subprocess import sys import threading import unittest + import six _portpicker_import_error = None diff --git a/tensorflow/python/distribute/parameter_server_strategy_test.py b/tensorflow/python/distribute/parameter_server_strategy_test.py index 66734ccb42c..1b3b26fbf8a 100644 --- a/tensorflow/python/distribute/parameter_server_strategy_test.py +++ b/tensorflow/python/distribute/parameter_server_strategy_test.py @@ -20,6 +20,7 @@ from __future__ import print_function import copy import threading + from absl.testing import parameterized from tensorflow.core.protobuf import config_pb2 from tensorflow.python.data.ops import dataset_ops diff --git a/tensorflow/python/distribute/saved_model_test_base.py b/tensorflow/python/distribute/saved_model_test_base.py index 08156290755..a15c57a17e2 100644 --- a/tensorflow/python/distribute/saved_model_test_base.py +++ b/tensorflow/python/distribute/saved_model_test_base.py @@ -19,6 +19,7 @@ from __future__ import division from __future__ import print_function import os + from absl.testing import parameterized import numpy as np diff --git a/tensorflow/python/distribute/values_test.py b/tensorflow/python/distribute/values_test.py index 0389a9d73b7..5c6c5e370c8 100644 --- a/tensorflow/python/distribute/values_test.py +++ b/tensorflow/python/distribute/values_test.py @@ -21,6 +21,7 @@ from __future__ import print_function import collections import itertools import os + from absl.testing import parameterized from tensorflow.core.protobuf import config_pb2 from tensorflow.python.distribute import combinations diff --git a/tensorflow/python/distribute/warm_starting_util_test.py b/tensorflow/python/distribute/warm_starting_util_test.py index c312ca8f82e..681b01fbbcd 100644 --- a/tensorflow/python/distribute/warm_starting_util_test.py +++ b/tensorflow/python/distribute/warm_starting_util_test.py @@ -26,6 +26,7 @@ from __future__ import division from __future__ import print_function import os + from absl.testing import parameterized from tensorflow.python.distribute import combinations diff --git a/tensorflow/python/feature_column/sequence_feature_column_test.py b/tensorflow/python/feature_column/sequence_feature_column_test.py index c7a21c94e2b..35eaa37cce7 100644 --- a/tensorflow/python/feature_column/sequence_feature_column_test.py +++ b/tensorflow/python/feature_column/sequence_feature_column_test.py @@ -19,6 +19,7 @@ from __future__ import division from __future__ import print_function import os + from absl.testing import parameterized import numpy as np diff --git a/tensorflow/python/framework/composite_tensor_test.py b/tensorflow/python/framework/composite_tensor_test.py index eda8289dda4..13f3f006361 100644 --- a/tensorflow/python/framework/composite_tensor_test.py +++ b/tensorflow/python/framework/composite_tensor_test.py @@ -21,6 +21,7 @@ from __future__ import print_function import gc import sys import weakref + from absl.testing import parameterized import numpy as np diff --git a/tensorflow/python/framework/convert_to_constants_test.py b/tensorflow/python/framework/convert_to_constants_test.py index 315fe235b17..e44847e2c6e 100644 --- a/tensorflow/python/framework/convert_to_constants_test.py +++ b/tensorflow/python/framework/convert_to_constants_test.py @@ -19,6 +19,7 @@ from __future__ import division from __future__ import print_function import os + import numpy as np from tensorflow.python import keras diff --git a/tensorflow/python/framework/graph_util_impl.py b/tensorflow/python/framework/graph_util_impl.py index 18888ffef10..6b88d7b02c3 100644 --- a/tensorflow/python/framework/graph_util_impl.py +++ b/tensorflow/python/framework/graph_util_impl.py @@ -20,6 +20,7 @@ from __future__ import division from __future__ import print_function import copy import re + import six from tensorflow.core.framework import attr_value_pb2 diff --git a/tensorflow/python/framework/indexed_slices.py b/tensorflow/python/framework/indexed_slices.py index 4e273b0c640..abf90547e50 100644 --- a/tensorflow/python/framework/indexed_slices.py +++ b/tensorflow/python/framework/indexed_slices.py @@ -21,6 +21,7 @@ from __future__ import print_function import collections import warnings + import numpy as np from tensorflow.python import tf2 diff --git a/tensorflow/python/framework/sparse_tensor.py b/tensorflow/python/framework/sparse_tensor.py index c6e50eb8fcb..72c5b80eee8 100644 --- a/tensorflow/python/framework/sparse_tensor.py +++ b/tensorflow/python/framework/sparse_tensor.py @@ -19,6 +19,7 @@ from __future__ import division from __future__ import print_function import collections + import numpy as np from tensorflow.python import pywrap_tensorflow # pylint: disable=unused-import diff --git a/tensorflow/python/framework/tensor_util_test.py b/tensorflow/python/framework/tensor_util_test.py index 6e1cad42c00..b2ab779386b 100644 --- a/tensorflow/python/framework/tensor_util_test.py +++ b/tensorflow/python/framework/tensor_util_test.py @@ -20,6 +20,7 @@ from __future__ import print_function import contextlib import sys + import numpy as np from tensorflow.python.framework import constant_op diff --git a/tensorflow/python/framework/type_spec.py b/tensorflow/python/framework/type_spec.py index 4b66bc50fd5..ce61290eb68 100644 --- a/tensorflow/python/framework/type_spec.py +++ b/tensorflow/python/framework/type_spec.py @@ -19,6 +19,7 @@ from __future__ import division from __future__ import print_function import abc + import numpy as np import six diff --git a/tensorflow/python/grappler/auto_mixed_precision_test.py b/tensorflow/python/grappler/auto_mixed_precision_test.py index e47a62ec5a1..4496827de69 100644 --- a/tensorflow/python/grappler/auto_mixed_precision_test.py +++ b/tensorflow/python/grappler/auto_mixed_precision_test.py @@ -20,6 +20,7 @@ from __future__ import print_function import os import unittest + import numpy as np from tensorflow.core.framework import types_pb2 diff --git a/tensorflow/python/grappler/hierarchical_controller.py b/tensorflow/python/grappler/hierarchical_controller.py index e39988d96b5..d1b36cb4ddb 100644 --- a/tensorflow/python/grappler/hierarchical_controller.py +++ b/tensorflow/python/grappler/hierarchical_controller.py @@ -26,6 +26,7 @@ from __future__ import division from __future__ import print_function import math + import numpy as np import six from tensorflow.python.framework import constant_op diff --git a/tensorflow/python/keras/distribute/keras_correctness_test_base.py b/tensorflow/python/keras/distribute/keras_correctness_test_base.py index 097a550dd20..1c40a48e830 100644 --- a/tensorflow/python/keras/distribute/keras_correctness_test_base.py +++ b/tensorflow/python/keras/distribute/keras_correctness_test_base.py @@ -18,6 +18,7 @@ from __future__ import division from __future__ import print_function import functools + from absl.testing import parameterized import numpy as np import six diff --git a/tensorflow/python/keras/distribute/keras_utils_test.py b/tensorflow/python/keras/distribute/keras_utils_test.py index b9b1976fbca..4bd9c435096 100644 --- a/tensorflow/python/keras/distribute/keras_utils_test.py +++ b/tensorflow/python/keras/distribute/keras_utils_test.py @@ -20,6 +20,7 @@ from __future__ import print_function import collections import tempfile + from absl.testing import parameterized import numpy as np from tensorflow.python import keras diff --git a/tensorflow/python/keras/distribute/multi_worker_fault_tolerance_test.py b/tensorflow/python/keras/distribute/multi_worker_fault_tolerance_test.py index f998a1d982d..c64e5ce61bf 100644 --- a/tensorflow/python/keras/distribute/multi_worker_fault_tolerance_test.py +++ b/tensorflow/python/keras/distribute/multi_worker_fault_tolerance_test.py @@ -23,6 +23,7 @@ import signal import sys import tempfile import threading + from absl.testing import parameterized from tensorflow.python.distribute import collective_all_reduce_strategy as collective_strategy from tensorflow.python.distribute import combinations diff --git a/tensorflow/python/keras/distribute/multi_worker_training_state_test.py b/tensorflow/python/keras/distribute/multi_worker_training_state_test.py index a726a1deb45..984db20b3b9 100644 --- a/tensorflow/python/keras/distribute/multi_worker_training_state_test.py +++ b/tensorflow/python/keras/distribute/multi_worker_training_state_test.py @@ -19,6 +19,7 @@ from __future__ import division from __future__ import print_function import os import sys + from absl.testing import parameterized from tensorflow.python.distribute import combinations from tensorflow.python.distribute import multi_worker_test_base as test_base diff --git a/tensorflow/python/keras/engine/base_layer_test.py b/tensorflow/python/keras/engine/base_layer_test.py index 02433be946d..201c2694c2a 100644 --- a/tensorflow/python/keras/engine/base_layer_test.py +++ b/tensorflow/python/keras/engine/base_layer_test.py @@ -22,6 +22,7 @@ import copy import os import sys import traceback + import numpy as np from tensorflow.python import keras diff --git a/tensorflow/python/keras/engine/base_preprocessing_layer.py b/tensorflow/python/keras/engine/base_preprocessing_layer.py index 29df4744673..9c46f0ce614 100644 --- a/tensorflow/python/keras/engine/base_preprocessing_layer.py +++ b/tensorflow/python/keras/engine/base_preprocessing_layer.py @@ -19,6 +19,7 @@ from __future__ import print_function import abc import collections + import numpy as np from tensorflow.python.data.experimental.ops import cardinality diff --git a/tensorflow/python/keras/engine/base_preprocessing_layer_test.py b/tensorflow/python/keras/engine/base_preprocessing_layer_test.py index f5008760f18..8f4b67beb6b 100644 --- a/tensorflow/python/keras/engine/base_preprocessing_layer_test.py +++ b/tensorflow/python/keras/engine/base_preprocessing_layer_test.py @@ -19,6 +19,7 @@ from __future__ import division from __future__ import print_function import json + import numpy as np from tensorflow.python import keras diff --git a/tensorflow/python/keras/engine/compile_utils.py b/tensorflow/python/keras/engine/compile_utils.py index 134573e514d..b9241280d0f 100644 --- a/tensorflow/python/keras/engine/compile_utils.py +++ b/tensorflow/python/keras/engine/compile_utils.py @@ -18,6 +18,7 @@ from __future__ import division from __future__ import print_function import copy + import six from tensorflow.python.keras import losses as losses_mod diff --git a/tensorflow/python/keras/engine/training.py b/tensorflow/python/keras/engine/training.py index b04ffacc7c1..771c6e8c17a 100644 --- a/tensorflow/python/keras/engine/training.py +++ b/tensorflow/python/keras/engine/training.py @@ -19,6 +19,7 @@ from __future__ import division from __future__ import print_function import collections + import numpy as np from tensorflow.python.data.ops import dataset_ops diff --git a/tensorflow/python/keras/engine/training_v1.py b/tensorflow/python/keras/engine/training_v1.py index eeb60784ba8..29ddc2c1a90 100644 --- a/tensorflow/python/keras/engine/training_v1.py +++ b/tensorflow/python/keras/engine/training_v1.py @@ -18,6 +18,7 @@ from __future__ import division from __future__ import print_function import collections + import numpy as np from tensorflow.python import tf2 diff --git a/tensorflow/python/keras/layers/cudnn_recurrent_test.py b/tensorflow/python/keras/layers/cudnn_recurrent_test.py index 1c20918ffc8..47c8ccdcf68 100644 --- a/tensorflow/python/keras/layers/cudnn_recurrent_test.py +++ b/tensorflow/python/keras/layers/cudnn_recurrent_test.py @@ -20,6 +20,7 @@ from __future__ import print_function import os import tempfile + from absl.testing import parameterized import numpy as np diff --git a/tensorflow/python/keras/layers/preprocessing/preprocessing_test_utils.py b/tensorflow/python/keras/layers/preprocessing/preprocessing_test_utils.py index d93dcc21d5e..006cab1fb11 100644 --- a/tensorflow/python/keras/layers/preprocessing/preprocessing_test_utils.py +++ b/tensorflow/python/keras/layers/preprocessing/preprocessing_test_utils.py @@ -19,6 +19,7 @@ from __future__ import division from __future__ import print_function import collections + import numpy as np from tensorflow.python.platform import test diff --git a/tensorflow/python/keras/layers/recurrent_v2_test.py b/tensorflow/python/keras/layers/recurrent_v2_test.py index 487ee81eeff..301243127ed 100644 --- a/tensorflow/python/keras/layers/recurrent_v2_test.py +++ b/tensorflow/python/keras/layers/recurrent_v2_test.py @@ -21,7 +21,6 @@ from __future__ import absolute_import from __future__ import division from __future__ import print_function - from absl.testing import parameterized import numpy as np diff --git a/tensorflow/python/keras/metrics.py b/tensorflow/python/keras/metrics.py index 2fd79fc0f2e..24eddcc2c72 100644 --- a/tensorflow/python/keras/metrics.py +++ b/tensorflow/python/keras/metrics.py @@ -21,6 +21,7 @@ from __future__ import print_function import abc import types + import numpy as np import six diff --git a/tensorflow/python/keras/metrics_test.py b/tensorflow/python/keras/metrics_test.py index 8e5ad564e5d..89ea53b886c 100644 --- a/tensorflow/python/keras/metrics_test.py +++ b/tensorflow/python/keras/metrics_test.py @@ -21,6 +21,7 @@ from __future__ import print_function import json import math import os + import numpy as np from tensorflow.python.eager import context diff --git a/tensorflow/python/keras/optimizer_v2/learning_rate_schedule_test.py b/tensorflow/python/keras/optimizer_v2/learning_rate_schedule_test.py index ce0e43d6a64..6a9fe40d95f 100644 --- a/tensorflow/python/keras/optimizer_v2/learning_rate_schedule_test.py +++ b/tensorflow/python/keras/optimizer_v2/learning_rate_schedule_test.py @@ -19,6 +19,7 @@ from __future__ import division from __future__ import print_function import math + from absl.testing import parameterized from tensorflow.python.eager import backprop diff --git a/tensorflow/python/keras/utils/conv_utils.py b/tensorflow/python/keras/utils/conv_utils.py index 5d031428bce..65338415f27 100644 --- a/tensorflow/python/keras/utils/conv_utils.py +++ b/tensorflow/python/keras/utils/conv_utils.py @@ -18,6 +18,7 @@ from __future__ import division from __future__ import print_function import itertools + import numpy as np from six.moves import range # pylint: disable=redefined-builtin diff --git a/tensorflow/python/keras/utils/version_utils_test.py b/tensorflow/python/keras/utils/version_utils_test.py index 65eee62f9e0..fa4b4a99221 100644 --- a/tensorflow/python/keras/utils/version_utils_test.py +++ b/tensorflow/python/keras/utils/version_utils_test.py @@ -19,6 +19,7 @@ from __future__ import division from __future__ import print_function import abc + import numpy as np import six diff --git a/tensorflow/python/kernel_tests/argmax_op_test.py b/tensorflow/python/kernel_tests/argmax_op_test.py index 38709721888..86d2941b8d3 100644 --- a/tensorflow/python/kernel_tests/argmax_op_test.py +++ b/tensorflow/python/kernel_tests/argmax_op_test.py @@ -18,6 +18,7 @@ from __future__ import division from __future__ import print_function import functools + import numpy as np from tensorflow.python.framework import dtypes diff --git a/tensorflow/python/kernel_tests/bias_op_deterministic_test.py b/tensorflow/python/kernel_tests/bias_op_deterministic_test.py index 7630f8f145c..738e6cf6fc6 100644 --- a/tensorflow/python/kernel_tests/bias_op_deterministic_test.py +++ b/tensorflow/python/kernel_tests/bias_op_deterministic_test.py @@ -19,6 +19,7 @@ from __future__ import division from __future__ import print_function import os + import numpy as np from absl.testing import parameterized diff --git a/tensorflow/python/kernel_tests/check_ops_test.py b/tensorflow/python/kernel_tests/check_ops_test.py index 08a940804d3..47f392d7438 100644 --- a/tensorflow/python/kernel_tests/check_ops_test.py +++ b/tensorflow/python/kernel_tests/check_ops_test.py @@ -19,6 +19,7 @@ from __future__ import division from __future__ import print_function import time + import numpy as np from tensorflow.core.protobuf import config_pb2 diff --git a/tensorflow/python/kernel_tests/checkpoint_ops_test.py b/tensorflow/python/kernel_tests/checkpoint_ops_test.py index a6746185680..305480c6b4b 100644 --- a/tensorflow/python/kernel_tests/checkpoint_ops_test.py +++ b/tensorflow/python/kernel_tests/checkpoint_ops_test.py @@ -18,6 +18,7 @@ from __future__ import division from __future__ import print_function import os + import numpy as np from tensorflow.python.framework import constant_op diff --git a/tensorflow/python/kernel_tests/cudnn_deterministic_base.py b/tensorflow/python/kernel_tests/cudnn_deterministic_base.py index 2b526f0ec6b..289cc393042 100644 --- a/tensorflow/python/kernel_tests/cudnn_deterministic_base.py +++ b/tensorflow/python/kernel_tests/cudnn_deterministic_base.py @@ -19,6 +19,7 @@ from __future__ import division from __future__ import print_function import collections + import numpy as np from tensorflow.python.framework import constant_op diff --git a/tensorflow/python/kernel_tests/lookup_ops_test.py b/tensorflow/python/kernel_tests/lookup_ops_test.py index 2be675ab899..b9e4323a2b3 100644 --- a/tensorflow/python/kernel_tests/lookup_ops_test.py +++ b/tensorflow/python/kernel_tests/lookup_ops_test.py @@ -19,6 +19,7 @@ from __future__ import print_function import os import tempfile + import numpy as np import six diff --git a/tensorflow/python/kernel_tests/matmul_op_test.py b/tensorflow/python/kernel_tests/matmul_op_test.py index f123492ff15..9f84946397e 100644 --- a/tensorflow/python/kernel_tests/matmul_op_test.py +++ b/tensorflow/python/kernel_tests/matmul_op_test.py @@ -19,6 +19,7 @@ from __future__ import division from __future__ import print_function import operator + import numpy as np from tensorflow.python import tf2 diff --git a/tensorflow/python/kernel_tests/matrix_logarithm_op_test.py b/tensorflow/python/kernel_tests/matrix_logarithm_op_test.py index ee6e3bb464f..0f5da8b27a4 100644 --- a/tensorflow/python/kernel_tests/matrix_logarithm_op_test.py +++ b/tensorflow/python/kernel_tests/matrix_logarithm_op_test.py @@ -18,7 +18,6 @@ from __future__ import absolute_import from __future__ import division from __future__ import print_function - import numpy as np from tensorflow.python.client import session diff --git a/tensorflow/python/kernel_tests/pooling_ops_test.py b/tensorflow/python/kernel_tests/pooling_ops_test.py index 5dcb1b6c6ae..d369f8c6cf1 100644 --- a/tensorflow/python/kernel_tests/pooling_ops_test.py +++ b/tensorflow/python/kernel_tests/pooling_ops_test.py @@ -20,6 +20,7 @@ from __future__ import print_function import collections import os + import numpy as np from tensorflow.python.eager import context diff --git a/tensorflow/python/kernel_tests/softmax_op_test.py b/tensorflow/python/kernel_tests/softmax_op_test.py index 22a4d8b4d91..c28ac79a47d 100644 --- a/tensorflow/python/kernel_tests/softmax_op_test.py +++ b/tensorflow/python/kernel_tests/softmax_op_test.py @@ -19,6 +19,7 @@ from __future__ import division from __future__ import print_function import unittest + import numpy as np diff --git a/tensorflow/python/kernel_tests/tridiagonal_matmul_op_test.py b/tensorflow/python/kernel_tests/tridiagonal_matmul_op_test.py index 8725a247385..c7b4a8689e2 100644 --- a/tensorflow/python/kernel_tests/tridiagonal_matmul_op_test.py +++ b/tensorflow/python/kernel_tests/tridiagonal_matmul_op_test.py @@ -19,6 +19,7 @@ from __future__ import division from __future__ import print_function import itertools + import numpy as np from tensorflow.python.client import session diff --git a/tensorflow/python/kernel_tests/tridiagonal_solve_op_test.py b/tensorflow/python/kernel_tests/tridiagonal_solve_op_test.py index 25270bb9e24..10a75f916c9 100644 --- a/tensorflow/python/kernel_tests/tridiagonal_solve_op_test.py +++ b/tensorflow/python/kernel_tests/tridiagonal_solve_op_test.py @@ -19,6 +19,7 @@ from __future__ import division from __future__ import print_function import itertools + import numpy as np from tensorflow.python.eager import backprop diff --git a/tensorflow/python/layers/normalization_test.py b/tensorflow/python/layers/normalization_test.py index 51a33cc9406..7672a9da84a 100644 --- a/tensorflow/python/layers/normalization_test.py +++ b/tensorflow/python/layers/normalization_test.py @@ -19,6 +19,7 @@ from __future__ import division from __future__ import print_function import os + import numpy as np from tensorflow.core.protobuf import saver_pb2 diff --git a/tensorflow/python/lib/io/file_io_test.py b/tensorflow/python/lib/io/file_io_test.py index 5f0125886f3..86e0c602d89 100644 --- a/tensorflow/python/lib/io/file_io_test.py +++ b/tensorflow/python/lib/io/file_io_test.py @@ -20,6 +20,7 @@ from __future__ import division from __future__ import print_function import os.path + import numpy as np from tensorflow.python.framework import errors diff --git a/tensorflow/python/ops/check_ops.py b/tensorflow/python/ops/check_ops.py index 98c84aaf7c2..3ffaf186df2 100644 --- a/tensorflow/python/ops/check_ops.py +++ b/tensorflow/python/ops/check_ops.py @@ -20,6 +20,7 @@ from __future__ import division from __future__ import print_function import collections + import numpy as np from tensorflow.python.eager import context diff --git a/tensorflow/python/ops/collective_ops_benchmark.py b/tensorflow/python/ops/collective_ops_benchmark.py index 870dec525b2..02e43a22f5f 100644 --- a/tensorflow/python/ops/collective_ops_benchmark.py +++ b/tensorflow/python/ops/collective_ops_benchmark.py @@ -19,6 +19,7 @@ from __future__ import division from __future__ import print_function import time + import numpy as np from tensorflow.core.protobuf import config_pb2 diff --git a/tensorflow/python/ops/control_flow_ops_test.py b/tensorflow/python/ops/control_flow_ops_test.py index a1fc8c036fb..8cea6108722 100644 --- a/tensorflow/python/ops/control_flow_ops_test.py +++ b/tensorflow/python/ops/control_flow_ops_test.py @@ -19,6 +19,7 @@ from __future__ import division from __future__ import print_function import collections + from absl.testing import parameterized import numpy as np diff --git a/tensorflow/python/ops/distributions/util.py b/tensorflow/python/ops/distributions/util.py index ec66b5c2527..aef9e6ed3c5 100644 --- a/tensorflow/python/ops/distributions/util.py +++ b/tensorflow/python/ops/distributions/util.py @@ -20,6 +20,7 @@ from __future__ import print_function import functools import hashlib + import numpy as np from tensorflow.python.framework import constant_op diff --git a/tensorflow/python/ops/gradients_test.py b/tensorflow/python/ops/gradients_test.py index 99ac046cd95..e3886dd7ca2 100644 --- a/tensorflow/python/ops/gradients_test.py +++ b/tensorflow/python/ops/gradients_test.py @@ -19,6 +19,7 @@ from __future__ import division from __future__ import print_function import sys import warnings + from absl.testing import parameterized import numpy as np from tensorflow.python.client import session diff --git a/tensorflow/python/ops/linalg/linear_operator_test_util.py b/tensorflow/python/ops/linalg/linear_operator_test_util.py index 33b8003ae2e..dc13039ffd3 100644 --- a/tensorflow/python/ops/linalg/linear_operator_test_util.py +++ b/tensorflow/python/ops/linalg/linear_operator_test_util.py @@ -20,6 +20,7 @@ from __future__ import print_function import abc import itertools + import numpy as np import six diff --git a/tensorflow/python/ops/lookup_ops.py b/tensorflow/python/ops/lookup_ops.py index fff4f97f979..72317c39f14 100644 --- a/tensorflow/python/ops/lookup_ops.py +++ b/tensorflow/python/ops/lookup_ops.py @@ -21,6 +21,7 @@ from __future__ import print_function import collections import functools import uuid + import six from tensorflow.python.eager import context diff --git a/tensorflow/python/ops/nccl_ops_test.py b/tensorflow/python/ops/nccl_ops_test.py index 3b2e2b0175f..d481bd3c2bd 100644 --- a/tensorflow/python/ops/nccl_ops_test.py +++ b/tensorflow/python/ops/nccl_ops_test.py @@ -19,6 +19,7 @@ from __future__ import division from __future__ import print_function from functools import partial + import numpy as np from tensorflow.python.framework import errors diff --git a/tensorflow/python/ops/ragged/ragged_dispatch.py b/tensorflow/python/ops/ragged/ragged_dispatch.py index 515100df6c8..7d024e53299 100644 --- a/tensorflow/python/ops/ragged/ragged_dispatch.py +++ b/tensorflow/python/ops/ragged/ragged_dispatch.py @@ -19,6 +19,7 @@ from __future__ import division from __future__ import print_function import collections + import numpy as np from tensorflow.python.framework import dtypes diff --git a/tensorflow/python/ops/ragged/ragged_rank_op_test.py b/tensorflow/python/ops/ragged/ragged_rank_op_test.py index ff051bcd4b1..12c5e736015 100644 --- a/tensorflow/python/ops/ragged/ragged_rank_op_test.py +++ b/tensorflow/python/ops/ragged/ragged_rank_op_test.py @@ -17,6 +17,7 @@ from __future__ import absolute_import from __future__ import division from __future__ import print_function + from absl.testing import parameterized from tensorflow.python.framework import test_util from tensorflow.python.ops.ragged import ragged_array_ops diff --git a/tensorflow/python/ops/ragged/ragged_segment_op_test.py b/tensorflow/python/ops/ragged/ragged_segment_op_test.py index 28ee0837e90..d29708a5f5d 100644 --- a/tensorflow/python/ops/ragged/ragged_segment_op_test.py +++ b/tensorflow/python/ops/ragged/ragged_segment_op_test.py @@ -19,6 +19,7 @@ from __future__ import division from __future__ import print_function import math + from absl.testing import parameterized from tensorflow.python.framework import constant_op diff --git a/tensorflow/python/ops/ragged/ragged_tensor.py b/tensorflow/python/ops/ragged/ragged_tensor.py index 79f6ad7b0ce..c2edbcf5e43 100644 --- a/tensorflow/python/ops/ragged/ragged_tensor.py +++ b/tensorflow/python/ops/ragged/ragged_tensor.py @@ -20,6 +20,7 @@ from __future__ import print_function import functools import operator + import numpy as np from tensorflow.python import tf2 diff --git a/tensorflow/python/ops/ragged/ragged_to_tensor_op_test.py b/tensorflow/python/ops/ragged/ragged_to_tensor_op_test.py index 6b0149d0723..fef6a7947e4 100644 --- a/tensorflow/python/ops/ragged/ragged_to_tensor_op_test.py +++ b/tensorflow/python/ops/ragged/ragged_to_tensor_op_test.py @@ -19,6 +19,7 @@ from __future__ import division from __future__ import print_function import random + from absl.testing import parameterized import numpy as np diff --git a/tensorflow/python/ops/ragged/ragged_where_op_test.py b/tensorflow/python/ops/ragged/ragged_where_op_test.py index ccefa557cf4..a0c6cfa5bed 100644 --- a/tensorflow/python/ops/ragged/ragged_where_op_test.py +++ b/tensorflow/python/ops/ragged/ragged_where_op_test.py @@ -17,6 +17,7 @@ from __future__ import absolute_import from __future__ import division from __future__ import print_function + from absl.testing import parameterized from tensorflow.python.framework import test_util from tensorflow.python.ops.ragged import ragged_factory_ops diff --git a/tensorflow/python/ops/structured/structured_tensor.py b/tensorflow/python/ops/structured/structured_tensor.py index 9f7efec6b5a..ad5831c9d8e 100644 --- a/tensorflow/python/ops/structured/structured_tensor.py +++ b/tensorflow/python/ops/structured/structured_tensor.py @@ -19,6 +19,7 @@ from __future__ import division from __future__ import print_function import re + import numpy as np from tensorflow.python.framework import composite_tensor diff --git a/tensorflow/python/ops/tensor_array_ops.py b/tensorflow/python/ops/tensor_array_ops.py index 869f90330e5..9c7bf25e201 100644 --- a/tensorflow/python/ops/tensor_array_ops.py +++ b/tensorflow/python/ops/tensor_array_ops.py @@ -20,6 +20,7 @@ from __future__ import division from __future__ import print_function import contextlib + import numpy as np import traceback import weakref diff --git a/tensorflow/python/ops/variables.py b/tensorflow/python/ops/variables.py index eae00217214..5cd329c1715 100644 --- a/tensorflow/python/ops/variables.py +++ b/tensorflow/python/ops/variables.py @@ -21,6 +21,7 @@ import enum # pylint: disable=g-bad-import-order import itertools import functools import os + import six from tensorflow.core.framework import attr_value_pb2 diff --git a/tensorflow/python/platform/flags.py b/tensorflow/python/platform/flags.py index 6225db77440..7e0e1e14628 100644 --- a/tensorflow/python/platform/flags.py +++ b/tensorflow/python/platform/flags.py @@ -22,6 +22,7 @@ import logging as _logging import sys as _sys # go/tf-wildcard-import + from absl.flags import * # pylint: disable=wildcard-import import six as _six diff --git a/tensorflow/python/platform/googletest.py b/tensorflow/python/platform/googletest.py index cabd85d8e79..cc3194be887 100644 --- a/tensorflow/python/platform/googletest.py +++ b/tensorflow/python/platform/googletest.py @@ -25,6 +25,7 @@ import tempfile # go/tf-wildcard-import # pylint: disable=wildcard-import,redefined-builtin + from absl.testing.absltest import * # pylint: enable=wildcard-import,redefined-builtin diff --git a/tensorflow/python/saved_model/nested_structure_coder.py b/tensorflow/python/saved_model/nested_structure_coder.py index 0dec1749db2..4ddbce3f81e 100644 --- a/tensorflow/python/saved_model/nested_structure_coder.py +++ b/tensorflow/python/saved_model/nested_structure_coder.py @@ -32,6 +32,7 @@ from __future__ import print_function import collections import functools + import six from tensorflow.core.protobuf import struct_pb2 diff --git a/tensorflow/python/tools/optimize_for_inference_lib.py b/tensorflow/python/tools/optimize_for_inference_lib.py index 31769324e2a..28b653f3611 100644 --- a/tensorflow/python/tools/optimize_for_inference_lib.py +++ b/tensorflow/python/tools/optimize_for_inference_lib.py @@ -51,6 +51,7 @@ from __future__ import print_function import collections import math import re + import numpy as np from tensorflow.core.framework import attr_value_pb2 diff --git a/tensorflow/python/tpu/device_assignment.py b/tensorflow/python/tpu/device_assignment.py index 71004b1cef7..16081f100cf 100644 --- a/tensorflow/python/tpu/device_assignment.py +++ b/tensorflow/python/tpu/device_assignment.py @@ -19,6 +19,7 @@ from __future__ import division from __future__ import print_function import math + import numpy as np from six.moves import xrange # pylint: disable=redefined-builtin diff --git a/tensorflow/python/tpu/profiler/capture_tpu_profile.py b/tensorflow/python/tpu/profiler/capture_tpu_profile.py index 7dcd3a67f15..f0d22027e4e 100644 --- a/tensorflow/python/tpu/profiler/capture_tpu_profile.py +++ b/tensorflow/python/tpu/profiler/capture_tpu_profile.py @@ -19,6 +19,7 @@ from __future__ import division from __future__ import print_function import os import sys + from absl import app from absl import flags from distutils.version import LooseVersion diff --git a/tensorflow/python/tpu/tpu_embedding.py b/tensorflow/python/tpu/tpu_embedding.py index 130f4d1fe2f..fb74e7e0e02 100644 --- a/tensorflow/python/tpu/tpu_embedding.py +++ b/tensorflow/python/tpu/tpu_embedding.py @@ -22,6 +22,7 @@ import collections import copy import math import re + import six from tensorflow.core.protobuf.tpu import optimization_parameters_pb2 diff --git a/tensorflow/tools/build_info/gen_build_info.py b/tensorflow/tools/build_info/gen_build_info.py index 098bb5c27c2..df9068fb3d1 100755 --- a/tensorflow/tools/build_info/gen_build_info.py +++ b/tensorflow/tools/build_info/gen_build_info.py @@ -19,6 +19,7 @@ from __future__ import division from __future__ import print_function import argparse + import six diff --git a/tensorflow/tools/compatibility/ast_edits_test.py b/tensorflow/tools/compatibility/ast_edits_test.py index d6a366d7220..2e5018b1ee4 100644 --- a/tensorflow/tools/compatibility/ast_edits_test.py +++ b/tensorflow/tools/compatibility/ast_edits_test.py @@ -46,6 +46,7 @@ from __future__ import print_function import ast import os + import six from tensorflow.python.framework import test_util diff --git a/tensorflow/tools/compatibility/ipynb.py b/tensorflow/tools/compatibility/ipynb.py index 77c8fedf709..ffebfcac725 100644 --- a/tensorflow/tools/compatibility/ipynb.py +++ b/tensorflow/tools/compatibility/ipynb.py @@ -25,6 +25,7 @@ import json import re import shutil import tempfile + import six CodeLine = collections.namedtuple("CodeLine", ["cell_number", "code"]) diff --git a/tensorflow/tools/compatibility/testdata/test_file_v0_11.py b/tensorflow/tools/compatibility/testdata/test_file_v0_11.py index 70a00e1220b..b07585cdc4e 100644 --- a/tensorflow/tools/compatibility/testdata/test_file_v0_11.py +++ b/tensorflow/tools/compatibility/testdata/test_file_v0_11.py @@ -19,6 +19,7 @@ from __future__ import division from __future__ import print_function import shutil import tempfile + import numpy as np import tensorflow as tf from tensorflow.python.framework import test_util diff --git a/tensorflow/tools/compatibility/testdata/test_file_v1_12.py b/tensorflow/tools/compatibility/testdata/test_file_v1_12.py index ca33adb4e33..483c06ac3d5 100644 --- a/tensorflow/tools/compatibility/testdata/test_file_v1_12.py +++ b/tensorflow/tools/compatibility/testdata/test_file_v1_12.py @@ -17,6 +17,7 @@ from __future__ import absolute_import from __future__ import division from __future__ import print_function + import tensorflow as tf from tensorflow.python.framework import test_util from tensorflow.python.platform import test as test_lib diff --git a/tensorflow/tools/compatibility/tf_upgrade_test.py b/tensorflow/tools/compatibility/tf_upgrade_test.py index ca0e80564ff..90e2010ff14 100644 --- a/tensorflow/tools/compatibility/tf_upgrade_test.py +++ b/tensorflow/tools/compatibility/tf_upgrade_test.py @@ -20,6 +20,7 @@ from __future__ import division from __future__ import print_function import os import tempfile + import six from tensorflow.python.framework import test_util from tensorflow.python.platform import test as test_lib diff --git a/tensorflow/tools/compatibility/update/generate_v2_reorders_map.py b/tensorflow/tools/compatibility/update/generate_v2_reorders_map.py index c4fd8aab90c..b45a6067b15 100644 --- a/tensorflow/tools/compatibility/update/generate_v2_reorders_map.py +++ b/tensorflow/tools/compatibility/update/generate_v2_reorders_map.py @@ -20,6 +20,7 @@ To update reorders_v2.py, run: bazel-bin/tensorflow/tools/compatibility/update/generate_v2_reorders_map """ # pylint: enable=line-too-long + import tensorflow as tf # This import is needed so that TensorFlow python modules are in sys.modules. diff --git a/tensorflow/tools/docs/pretty_docs.py b/tensorflow/tools/docs/pretty_docs.py index e215d19f403..98b5c7a3b39 100644 --- a/tensorflow/tools/docs/pretty_docs.py +++ b/tensorflow/tools/docs/pretty_docs.py @@ -29,6 +29,7 @@ from __future__ import division from __future__ import print_function import textwrap + import six diff --git a/tensorflow/tools/docs/py_guide_parser.py b/tensorflow/tools/docs/py_guide_parser.py index 70149c4dd9e..8d1cee6912a 100644 --- a/tensorflow/tools/docs/py_guide_parser.py +++ b/tensorflow/tools/docs/py_guide_parser.py @@ -22,6 +22,7 @@ from __future__ import print_function import os import re + import six diff --git a/tensorflow/tools/tensorflow_builder/config_detector/config_detector.py b/tensorflow/tools/tensorflow_builder/config_detector/config_detector.py index 2c24780bcfd..090e3172c34 100755 --- a/tensorflow/tools/tensorflow_builder/config_detector/config_detector.py +++ b/tensorflow/tools/tensorflow_builder/config_detector/config_detector.py @@ -69,6 +69,7 @@ import json import re import subprocess import sys + from absl import app from absl import flags import six diff --git a/tensorflow/tools/tensorflow_builder/config_detector/data/cuda_compute_capability.py b/tensorflow/tools/tensorflow_builder/config_detector/data/cuda_compute_capability.py index 9d17dbc9178..4bbdb79fad3 100644 --- a/tensorflow/tools/tensorflow_builder/config_detector/data/cuda_compute_capability.py +++ b/tensorflow/tools/tensorflow_builder/config_detector/data/cuda_compute_capability.py @@ -40,6 +40,7 @@ import collections import difflib import os import re + from absl import app from absl import flags