Replace direct TF app import with absl::app.
(1) TF::app is deprecated (2) direct TF import is discouraged. go/gpylint-faq#g-direct-tensorflow-import PiperOrigin-RevId: 360830900 Change-Id: I26db9bb195e61463932d68b2f61ac5a200a26a61
This commit is contained in:
parent
a76c1bb425
commit
1d59d77840
@ -35,7 +35,7 @@ import os
|
||||
import socket
|
||||
import sys
|
||||
|
||||
from tensorflow.python.platform import app
|
||||
from absl import app
|
||||
|
||||
# pylint: disable=g-import-not-at-top
|
||||
# Official recommended way of turning on fast protocol buffers as of 10/21/14
|
||||
|
@ -23,6 +23,7 @@ import re
|
||||
import sys
|
||||
import threading
|
||||
import types
|
||||
from absl import app
|
||||
|
||||
import numpy as np
|
||||
import six
|
||||
@ -61,7 +62,6 @@ from tensorflow.python.framework import tensor_shape
|
||||
from tensorflow.python.framework import traceable_stack
|
||||
from tensorflow.python.framework import versions
|
||||
from tensorflow.python.ops import control_flow_util
|
||||
from tensorflow.python.platform import app
|
||||
from tensorflow.python.platform import tf_logging as logging
|
||||
from tensorflow.python.profiler import trace
|
||||
from tensorflow.python.types import core as core_tf_types
|
||||
|
@ -26,6 +26,7 @@ import sys
|
||||
import time
|
||||
import types
|
||||
|
||||
from absl import app
|
||||
import six
|
||||
|
||||
from tensorflow.core.protobuf import config_pb2
|
||||
@ -33,7 +34,6 @@ from tensorflow.core.protobuf import rewriter_config_pb2
|
||||
from tensorflow.core.util import test_log_pb2
|
||||
from tensorflow.python.client import timeline
|
||||
from tensorflow.python.framework import ops
|
||||
from tensorflow.python.platform import app
|
||||
from tensorflow.python.platform import gfile
|
||||
from tensorflow.python.platform import tf_logging as logging
|
||||
from tensorflow.python.util import tf_inspect
|
||||
|
@ -25,13 +25,12 @@ import tempfile
|
||||
|
||||
# go/tf-wildcard-import
|
||||
# pylint: disable=wildcard-import,redefined-builtin
|
||||
|
||||
from absl import app
|
||||
from absl.testing.absltest import *
|
||||
# pylint: enable=wildcard-import,redefined-builtin
|
||||
|
||||
from tensorflow.python.framework import errors
|
||||
from tensorflow.python.lib.io import file_io
|
||||
from tensorflow.python.platform import app
|
||||
from tensorflow.python.platform import benchmark
|
||||
from tensorflow.python.platform import tf_logging as logging
|
||||
from tensorflow.python.util import tf_decorator
|
||||
|
@ -41,15 +41,15 @@ import argparse
|
||||
import re
|
||||
import sys
|
||||
|
||||
from google.protobuf import text_format
|
||||
from absl import app
|
||||
|
||||
from google.protobuf import text_format
|
||||
from tensorflow.core.framework import graph_pb2
|
||||
from tensorflow.core.protobuf import saver_pb2
|
||||
from tensorflow.core.protobuf.meta_graph_pb2 import MetaGraphDef
|
||||
from tensorflow.python.client import session
|
||||
from tensorflow.python.framework import graph_util
|
||||
from tensorflow.python.framework import importer
|
||||
from tensorflow.python.platform import app
|
||||
from tensorflow.python.platform import gfile
|
||||
from tensorflow.python.saved_model import loader
|
||||
from tensorflow.python.saved_model import tag_constants
|
||||
|
@ -21,10 +21,11 @@ from __future__ import print_function
|
||||
import argparse
|
||||
import sys
|
||||
|
||||
from absl import app
|
||||
|
||||
from tensorflow.python.client import session
|
||||
from tensorflow.python.framework import importer
|
||||
from tensorflow.python.framework import ops
|
||||
from tensorflow.python.platform import app
|
||||
from tensorflow.python.summary import summary
|
||||
from tensorflow.python.tools import saved_model_utils
|
||||
|
||||
|
@ -21,9 +21,9 @@ import argparse
|
||||
import re
|
||||
import sys
|
||||
|
||||
from absl import app
|
||||
import numpy as np
|
||||
|
||||
from tensorflow.python.platform import app
|
||||
from tensorflow.python.platform import flags
|
||||
from tensorflow.python.training import py_checkpoint_reader
|
||||
|
||||
|
@ -20,6 +20,7 @@ from __future__ import print_function
|
||||
|
||||
import os
|
||||
|
||||
from absl import app
|
||||
from absl import flags
|
||||
|
||||
from tensorflow.python.eager import def_function
|
||||
@ -27,7 +28,6 @@ from tensorflow.python.framework import dtypes
|
||||
from tensorflow.python.framework import tensor_spec
|
||||
from tensorflow.python.ops import array_ops
|
||||
from tensorflow.python.ops import math_ops
|
||||
from tensorflow.python.platform import app
|
||||
from tensorflow.python.saved_model import save
|
||||
from tensorflow.python.training.tracking import tracking
|
||||
|
||||
|
@ -59,12 +59,12 @@ import argparse
|
||||
import os
|
||||
import sys
|
||||
|
||||
from google.protobuf import text_format
|
||||
from absl import app
|
||||
|
||||
from google.protobuf import text_format
|
||||
from tensorflow.core.framework import graph_pb2
|
||||
from tensorflow.python.framework import dtypes
|
||||
from tensorflow.python.framework import graph_io
|
||||
from tensorflow.python.platform import app
|
||||
from tensorflow.python.platform import gfile
|
||||
from tensorflow.python.tools import optimize_for_inference_lib
|
||||
|
||||
|
@ -38,7 +38,7 @@ from __future__ import print_function
|
||||
import argparse
|
||||
import sys
|
||||
|
||||
from tensorflow.python.platform import app
|
||||
from absl import app
|
||||
from tensorflow.python.tools import selective_registration_header_lib
|
||||
|
||||
FLAGS = None
|
||||
|
@ -28,6 +28,7 @@ import os
|
||||
import re
|
||||
import sys
|
||||
|
||||
from absl import app # pylint: disable=unused-import
|
||||
import numpy as np
|
||||
import six
|
||||
|
||||
@ -41,7 +42,6 @@ from tensorflow.python.framework import meta_graph as meta_graph_lib
|
||||
from tensorflow.python.framework import ops as ops_lib
|
||||
from tensorflow.python.framework import tensor_spec
|
||||
from tensorflow.python.lib.io import file_io
|
||||
from tensorflow.python.platform import app # pylint: disable=unused-import
|
||||
from tensorflow.python.platform import tf_logging as logging
|
||||
from tensorflow.python.saved_model import load
|
||||
from tensorflow.python.saved_model import loader
|
||||
|
@ -44,8 +44,9 @@ from __future__ import print_function
|
||||
import argparse
|
||||
import sys
|
||||
|
||||
from absl import app
|
||||
|
||||
from tensorflow.python.framework import dtypes
|
||||
from tensorflow.python.platform import app
|
||||
from tensorflow.python.tools import strip_unused_lib
|
||||
|
||||
FLAGS = None
|
||||
|
Loading…
x
Reference in New Issue
Block a user