未验证 提交 77ed03d6 编写于 作者: J JYChen 提交者: GitHub

remove non-public apis from __all__ (#48952)

* remove non-public apis from __all__

* fix code style
上级 173ed8c2
...@@ -15,11 +15,10 @@ ...@@ -15,11 +15,10 @@
from .api import save from .api import save
from .api import load from .api import load
from .api import set_code_level
from .api import set_verbosity
from .api import declarative as to_static from .api import declarative as to_static
from .api import not_to_static from .api import not_to_static
from .api import TranslatedLayer from .api import TranslatedLayer
from .dy2static.logging_utils import set_code_level, set_verbosity
from . import dy2static from . import dy2static
from .dy2static.program_translator import ProgramTranslator from .dy2static.program_translator import ProgramTranslator
......
...@@ -42,10 +42,6 @@ from .dy2static.convert_call_func import ( ...@@ -42,10 +42,6 @@ from .dy2static.convert_call_func import (
ConversionOptions, ConversionOptions,
CONVERSION_OPTIONS, CONVERSION_OPTIONS,
) )
from .dy2static.logging_utils import (
set_code_level,
set_verbosity,
)
from .dy2static.program_translator import ( from .dy2static.program_translator import (
ProgramTranslator, ProgramTranslator,
StaticFunction, StaticFunction,
...@@ -76,14 +72,7 @@ from paddle.fluid.framework import ( ...@@ -76,14 +72,7 @@ from paddle.fluid.framework import (
from paddle.fluid.framework import dygraph_only, _non_static_mode from paddle.fluid.framework import dygraph_only, _non_static_mode
from paddle.fluid.wrapped_decorator import wrap_decorator from paddle.fluid.wrapped_decorator import wrap_decorator
__all__ = [ __all__ = []
'declarative',
'set_code_level',
'set_verbosity',
'save',
'load',
'not_to_static',
]
def create_program_from_desc(program_desc): def create_program_from_desc(program_desc):
......
...@@ -44,7 +44,7 @@ from paddle.utils import gast ...@@ -44,7 +44,7 @@ from paddle.utils import gast
from .base_transformer import BaseTransformer from .base_transformer import BaseTransformer
__all__ = ['IfElseTransformer'] __all__ = []
TRUE_FUNC_PREFIX = 'true_fn' TRUE_FUNC_PREFIX = 'true_fn'
FALSE_FUNC_PREFIX = 'false_fn' FALSE_FUNC_PREFIX = 'false_fn'
......
...@@ -74,13 +74,11 @@ from ..fluid.io import batch # noqa: F401 ...@@ -74,13 +74,11 @@ from ..fluid.io import batch # noqa: F401
from ..fluid.contrib.layers import ctr_metric_bundle # noqa: F401 from ..fluid.contrib.layers import ctr_metric_bundle # noqa: F401
from ..fluid.layers import exponential_decay # noqa: F401 from ..fluid.layers import exponential_decay # noqa: F401
from .nn.common import batch_norm # noqa: F401
from .nn.metric import auc # noqa: F401 from .nn.metric import auc # noqa: F401
from .nn.metric import accuracy # noqa: F401 from .nn.metric import accuracy # noqa: F401
__all__ = [ # noqa __all__ = [ # noqa
'append_backward', 'append_backward',
'batch_norm',
'gradients', 'gradients',
'Executor', 'Executor',
'global_scope', 'global_scope',
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册