Update renames_v2.py file and fix a few renaming inconsistencies.
PiperOrigin-RevId: 275535416 Change-Id: I1261abe2b97aedc786a35236c5af422b3f4544d3
This commit is contained in:
parent
78db1466a7
commit
a450c64d09
tensorflow/tools/compatibility
@ -279,6 +279,8 @@ manual_symbol_renames = {
|
||||
"tf.recompute_grad",
|
||||
"tf.count_nonzero":
|
||||
"tf.math.count_nonzero",
|
||||
"tf.decode_raw":
|
||||
"tf.io.decode_raw",
|
||||
"tf.manip.batch_to_space_nd":
|
||||
"tf.batch_to_space",
|
||||
"tf.quantize_v2":
|
||||
@ -550,6 +552,7 @@ manual_symbol_renames = {
|
||||
"tf.compat.v1.where",
|
||||
"tf.where_v2":
|
||||
"tf.compat.v2.where",
|
||||
"tf.app.flags": "tf.compat.v1.app.flags",
|
||||
}
|
||||
# pylint: enable=line-too-long
|
||||
|
||||
|
@ -18,7 +18,7 @@
|
||||
THIS FILE IS AUTOGENERATED: To update, please run:
|
||||
bazel build tensorflow/tools/compatibility/update:generate_v2_renames_map
|
||||
bazel-bin/tensorflow/tools/compatibility/update/generate_v2_renames_map
|
||||
pyformat --in_place third_party/tensorflow/tools/compatibility/renames_v2.py
|
||||
pyformat --in_place third_party/tensorflow/tools/compatibility/renames_v2.py
|
||||
This file should be updated whenever endpoints are deprecated.
|
||||
"""
|
||||
from __future__ import absolute_import
|
||||
@ -154,8 +154,6 @@ renames = {
|
||||
'tf.math.angle',
|
||||
'tf.app.run':
|
||||
'tf.compat.v1.app.run',
|
||||
'tf.app.flags':
|
||||
'tf.compat.v1.app.flags',
|
||||
'tf.assert_greater_equal':
|
||||
'tf.compat.v1.assert_greater_equal',
|
||||
'tf.assert_integer':
|
||||
@ -254,8 +252,6 @@ renames = {
|
||||
'tf.io.decode_compressed',
|
||||
'tf.decode_json_example':
|
||||
'tf.io.decode_json_example',
|
||||
'tf.decode_raw':
|
||||
'tf.io.decode_raw',
|
||||
'tf.delete_session_tensor':
|
||||
'tf.compat.v1.delete_session_tensor',
|
||||
'tf.depth_to_space':
|
||||
@ -368,8 +364,8 @@ renames = {
|
||||
'tf.compat.v1.estimator.tpu.TPUEstimator',
|
||||
'tf.estimator.tpu.TPUEstimatorSpec':
|
||||
'tf.compat.v1.estimator.tpu.TPUEstimatorSpec',
|
||||
'tf.estimator.tpu.experimental.EmbeddingSpec':
|
||||
'tf.compat.v1.estimator.tpu.experimental.EmbeddingSpec',
|
||||
'tf.estimator.tpu.experimental.EmbeddingConfigSpec':
|
||||
'tf.compat.v1.estimator.tpu.experimental.EmbeddingConfigSpec',
|
||||
'tf.experimental.output_all_intermediates':
|
||||
'tf.compat.v1.experimental.output_all_intermediates',
|
||||
'tf.expm1':
|
||||
@ -400,8 +396,6 @@ renames = {
|
||||
'tf.signal.fft3d',
|
||||
'tf.fixed_size_partitioner':
|
||||
'tf.compat.v1.fixed_size_partitioner',
|
||||
'tf.floor_div':
|
||||
'tf.compat.v1.floor_div',
|
||||
'tf.floordiv':
|
||||
'tf.math.floordiv',
|
||||
'tf.floormod':
|
||||
@ -620,6 +614,8 @@ renames = {
|
||||
'tf.compat.v1.lite.OpHint',
|
||||
'tf.lite.TocoConverter':
|
||||
'tf.compat.v1.lite.TocoConverter',
|
||||
'tf.lite.constants.FLOAT16':
|
||||
'tf.compat.v1.lite.constants.FLOAT16',
|
||||
'tf.lite.constants.GRAPHVIZ_DOT':
|
||||
'tf.compat.v1.lite.constants.GRAPHVIZ_DOT',
|
||||
'tf.lite.constants.INT8':
|
||||
@ -726,8 +722,6 @@ renames = {
|
||||
'tf.compat.v1.losses.sparse_softmax_cross_entropy',
|
||||
'tf.make_template':
|
||||
'tf.compat.v1.make_template',
|
||||
'tf.make_tensor_proto':
|
||||
'tf.compat.v1.make_tensor_proto',
|
||||
'tf.manip.gather_nd':
|
||||
'tf.compat.v1.manip.gather_nd',
|
||||
'tf.manip.reshape':
|
||||
@ -833,7 +827,7 @@ renames = {
|
||||
'tf.min_max_variable_partitioner':
|
||||
'tf.compat.v1.min_max_variable_partitioner',
|
||||
'tf.mod':
|
||||
'tf.math.mod',
|
||||
'tf.math.floormod',
|
||||
'tf.model_variables':
|
||||
'tf.compat.v1.model_variables',
|
||||
'tf.moving_average_variables':
|
||||
@ -1022,6 +1016,10 @@ renames = {
|
||||
'tf.saved_model.ASSETS_DIRECTORY',
|
||||
'tf.saved_model.constants.ASSETS_KEY':
|
||||
'tf.saved_model.ASSETS_KEY',
|
||||
'tf.saved_model.constants.DEBUG_DIRECTORY':
|
||||
'tf.saved_model.DEBUG_DIRECTORY',
|
||||
'tf.saved_model.constants.DEBUG_INFO_FILENAME_PB':
|
||||
'tf.saved_model.DEBUG_INFO_FILENAME_PB',
|
||||
'tf.saved_model.constants.LEGACY_INIT_OP_KEY':
|
||||
'tf.compat.v1.saved_model.constants.LEGACY_INIT_OP_KEY',
|
||||
'tf.saved_model.constants.MAIN_OP_KEY':
|
||||
@ -1572,8 +1570,6 @@ renames = {
|
||||
'tf.compat.v1.variables_initializer',
|
||||
'tf.verify_tensor_all_finite':
|
||||
'tf.compat.v1.verify_tensor_all_finite',
|
||||
'tf.where_v2':
|
||||
'tf.where',
|
||||
'tf.wrap_function':
|
||||
'tf.compat.v1.wrap_function',
|
||||
'tf.write_file':
|
||||
|
@ -303,7 +303,7 @@ class TestUpgrade(test_util.TensorFlowTestCase, parameterized.TestCase):
|
||||
if tf_name in keyword_renames:
|
||||
# If we rename arguments, new function must be available in 2.0.
|
||||
# We should not be using compat.v1 in this case.
|
||||
self.assertFalse(
|
||||
self.fail(
|
||||
"Function '%s' is not in 2.0 when converting\n%s\nto\n%s" %
|
||||
(new_function_name, text_input, text))
|
||||
continue
|
||||
|
@ -59,6 +59,7 @@ _FILE_HEADER = """# Copyright 2018 The TensorFlow Authors. All Rights Reserved.
|
||||
THIS FILE IS AUTOGENERATED: To update, please run:
|
||||
bazel build tensorflow/tools/compatibility/update:generate_v2_renames_map
|
||||
bazel-bin/tensorflow/tools/compatibility/update/generate_v2_renames_map
|
||||
pyformat --in_place third_party/tensorflow/tools/compatibility/renames_v2.py
|
||||
This file should be updated whenever endpoints are deprecated.
|
||||
\"\"\"
|
||||
from __future__ import absolute_import
|
||||
|
Loading…
Reference in New Issue
Block a user