Add _major_api_version setting to tensorflow top level module in pip package.
This attribute is checked in tensorflow/tools/api/tests:module_test and tensorfow/tools/api/tests:api_compatibility_test. PiperOrigin-RevId: 288046622 Change-Id: I9b8cf736a0395b9e90960567b0685db9b5307583
This commit is contained in:
parent
572354c8fd
commit
d6d4c5df84
@ -100,6 +100,8 @@ for _m in _top_level_modules:
|
||||
# We still need all the names that are toplevel on tensorflow_core
|
||||
from tensorflow_core import *
|
||||
|
||||
_major_api_version = 1
|
||||
|
||||
# In V1 API we need to print deprecation messages
|
||||
from tensorflow.python.util import deprecation_wrapper as _deprecation
|
||||
if not isinstance(_sys.modules[__name__], _deprecation.DeprecationWrapper):
|
||||
|
@ -100,6 +100,8 @@ for _m in _top_level_modules:
|
||||
# We still need all the names that are toplevel on tensorflow_core
|
||||
from tensorflow_core import *
|
||||
|
||||
_major_api_version = 2
|
||||
|
||||
# These should not be visible in the main tf module.
|
||||
try:
|
||||
del core
|
||||
|
Loading…
Reference in New Issue
Block a user