From: A. Unique TensorFlower Date: Mon, 26 Feb 2018 19:50:49 +0000 (-0800) Subject: Add the internal module name prefix to the white list. X-Git-Tag: upstream/v1.7.0~112 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=8525e1dbdcab467e545f09ecf60f0be11b48cd28;p=platform%2Fupstream%2Ftensorflow.git Add the internal module name prefix to the white list. PiperOrigin-RevId: 187056701 --- diff --git a/tensorflow/contrib/py2tf/impl/config.py b/tensorflow/contrib/py2tf/impl/config.py index c90e85c..bdbc666 100644 --- a/tensorflow/contrib/py2tf/impl/config.py +++ b/tensorflow/contrib/py2tf/impl/config.py @@ -31,12 +31,16 @@ PYTHON_LITERALS = { DEFAULT_UNCOMPILED_MODULES = set(( ('tensorflow',), (utils.__name__,), + + # All of tensorflow's subpackages. Unlike the root tf module, they don't + # have well-known names. Not refering to the module directly to avoid + # circular imports. + (utils.__name__[:-len('.contrib.py2tf.utils')],), )) NO_SIDE_EFFECT_CONSTRUCTORS = set(('tensorflow',)) # TODO(mdan): Also allow controlling the generated names (for testability). -# TODO(mdan): Make sure copybara renames the reference below. COMPILED_IMPORT_STATEMENTS = ( 'from __future__ import print_function', 'import tensorflow as tf',