From bc9877fa53cec1a3ad2776a3e70549d11ebd6c45 Mon Sep 17 00:00:00 2001 From: Gunhan Gulsoy Date: Wed, 11 Sep 2019 23:55:11 -0700 Subject: [PATCH] Remove contrib descent from tf_upgrade_v2_test PiperOrigin-RevId: 268622066 --- tensorflow/tools/compatibility/tf_upgrade_v2_test.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/tensorflow/tools/compatibility/tf_upgrade_v2_test.py b/tensorflow/tools/compatibility/tf_upgrade_v2_test.py index 4464a2aed63..6bdf65135ad 100644 --- a/tensorflow/tools/compatibility/tf_upgrade_v2_test.py +++ b/tensorflow/tools/compatibility/tf_upgrade_v2_test.py @@ -340,11 +340,16 @@ class TestUpgrade(test_util.TensorFlowTestCase, parameterized.TestCase): method_names = full_dict.keys() for method_name in method_names: args = full_dict[method_name].keys() - # special case for optimizer methods - if method_name.startswith("*."): + if "contrib" in method_name: + # Skip descending and fetching contrib methods during test. These are + # not available in the repo anymore. + continue + elif method_name.startswith("*."): + # special case for optimizer methods method = method_name.replace("*", "tf.train.Optimizer") else: method = method_name + method = get_symbol_for_name(tf, method) arg_spec = tf_inspect.getfullargspec(method) for (arg, pos) in args: