Remove contrib descent from tf_upgrade_v2_test

PiperOrigin-RevId: 268622066
This commit is contained in:
Gunhan Gulsoy 2019-09-11 23:55:11 -07:00 committed by TensorFlower Gardener
parent 73bb698461
commit bc9877fa53

View File

@ -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: