Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

remove non-public apis from __all__ #48952

Merged
merged 3 commits into from
Dec 13, 2022
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 @@ -39,10 +39,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 @@ -73,14 +69,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 @@ -57,7 +57,7 @@
create_name_str,
)

__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 paddle.static.nn.metric import auc # noqa: F401
from paddle.static.nn.metric import accuracy # noqa: F401

__all__ = [ # noqa
'append_backward',
'batch_norm',
'gradients',
'Executor',
'global_scope',
Expand Down
2 changes: 1 addition & 1 deletion python/paddle/static/nn/metric.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
from paddle.fluid.layer_helper import LayerHelper
from paddle.fluid.layers import tensor

__all__ = ['accuracy', 'auc']
__all__ = []


def accuracy(input, label, k=1, correct=None, total=None):
Expand Down