Skip to content

Commit

Permalink
remove non-public apis from __all__ (PaddlePaddle#48952)
Browse files Browse the repository at this point in the history
* remove non-public apis from __all__

* fix code style
  • Loading branch information
zoooo0820 authored Dec 13, 2022
1 parent 3d35959 commit ee334fb
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 17 deletions.
3 changes: 1 addition & 2 deletions python/paddle/jit/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,10 @@

from .api import save
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 not_to_static
from .api import TranslatedLayer
from .dy2static.logging_utils import set_code_level, set_verbosity

from . import dy2static
from .dy2static.program_translator import ProgramTranslator
Expand Down
13 changes: 1 addition & 12 deletions python/paddle/jit/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,6 @@
ConversionOptions,
CONVERSION_OPTIONS,
)
from .dy2static.logging_utils import (
set_code_level,
set_verbosity,
)
from .dy2static.program_translator import (
ProgramTranslator,
StaticFunction,
Expand Down Expand Up @@ -76,14 +72,7 @@
from paddle.fluid.framework import dygraph_only, _non_static_mode
from paddle.fluid.wrapped_decorator import wrap_decorator

__all__ = [
'declarative',
'set_code_level',
'set_verbosity',
'save',
'load',
'not_to_static',
]
__all__ = []


def create_program_from_desc(program_desc):
Expand Down
2 changes: 1 addition & 1 deletion python/paddle/jit/dy2static/ifelse_transformer.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@

from .base_transformer import BaseTransformer

__all__ = ['IfElseTransformer']
__all__ = []

TRUE_FUNC_PREFIX = 'true_fn'
FALSE_FUNC_PREFIX = 'false_fn'
Expand Down
2 changes: 0 additions & 2 deletions python/paddle/static/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,13 +74,11 @@
from ..fluid.contrib.layers import ctr_metric_bundle # 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 accuracy # noqa: F401

__all__ = [ # noqa
'append_backward',
'batch_norm',
'gradients',
'Executor',
'global_scope',
Expand Down

0 comments on commit ee334fb

Please # to comment.