Fix our issue with the explicit import in __init__ (#19890)
This commit is contained in:
parent
d20f4a73f4
commit
2f846b0cfe
@ -148,9 +148,9 @@ def update_package_init(template_fname, dest_fname, api_module):
|
||||
for line in template_file:
|
||||
if "# DO NOT EDIT." in line:
|
||||
dest_file.write(line)
|
||||
# Import all symbols from `api/`.
|
||||
# Import all public symbols from `api/` and `__version__`.
|
||||
for symbol in api_module.__dict__.keys():
|
||||
if symbol.startswith("__") and symbol != "__version__":
|
||||
if symbol.startswith("_") and symbol != "__version__":
|
||||
continue
|
||||
dest_file.write(f"from keras.api import {symbol}\n")
|
||||
# Skip the previous autogenerated block.
|
||||
|
@ -20,7 +20,6 @@ from keras.api import Sequential
|
||||
from keras.api import StatelessScope
|
||||
from keras.api import Variable
|
||||
from keras.api import __version__
|
||||
from keras.api import _tf_keras
|
||||
from keras.api import activations
|
||||
from keras.api import applications
|
||||
from keras.api import backend
|
||||
|
Loading…
Reference in New Issue
Block a user