Skip to content

Commit

Permalink
remove functions not belong to public-api from __all__
Browse files Browse the repository at this point in the history
  • Loading branch information
zoooo0820 committed Nov 2, 2022
1 parent 61953b9 commit 9ff3ab7
Show file tree
Hide file tree
Showing 7 changed files with 4 additions and 23 deletions.
2 changes: 1 addition & 1 deletion python/paddle/audio/datasets/esc50.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
from paddle.dataset.common import DATA_HOME
from .dataset import AudioClassificationDataset

__all__ = ['ESC50']
__all__ = []


class ESC50(AudioClassificationDataset):
Expand Down
2 changes: 1 addition & 1 deletion python/paddle/audio/datasets/tess.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
from paddle.dataset.common import DATA_HOME
from .dataset import AudioClassificationDataset

__all__ = ['TESS']
__all__ = []


class TESS(AudioClassificationDataset):
Expand Down
2 changes: 0 additions & 2 deletions python/paddle/distributed/communication/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,3 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

__all__ = ["stream"]
6 changes: 1 addition & 5 deletions python/paddle/geometric/message_passing/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,4 @@
from .send_recv import send_ue_recv # noqa: F401
from .send_recv import send_uv # noqa: F401

__all__ = [
'send_u_recv',
'send_ue_recv',
'send_uv',
]
__all__ = []
4 changes: 1 addition & 3 deletions python/paddle/geometric/sampling/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,4 @@

from .neighbors import sample_neighbors # noqa: F401

__all__ = [
'sample_neighbors',
]
__all__ = []
2 changes: 0 additions & 2 deletions python/paddle/incubate/multiprocessing/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,6 @@

from multiprocessing import * # noqa: F403

__all__ += multiprocessing.__all__ # type: ignore[attr-defined]

# Only support linux for now
# Only support file_system sharing strategy.

Expand Down
9 changes: 0 additions & 9 deletions python/paddle/tensor/ops.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,20 +73,13 @@

__all__ = []

for _OP in set(__all__):
globals()[_OP] = generate_layer_fn(_OP)

# It is a hot fix in some unittest using:
# fluid.layers.scale(x=x, scale=10.0, out=out_var)
# e.g.: test_program_code.py, test_dist_train.py
globals()['_scale'] = generate_layer_fn('scale')

globals()['_elementwise_div'] = generate_layer_fn('elementwise_div')

__all__ += __activations_noattr__
__all__ += __unary_func__
__all__ += __inplace_unary_func__

for _OP in set(__activations_noattr__):
_new_OP = _OP
if _OP in __deprecated_func_name__:
Expand Down Expand Up @@ -506,8 +499,6 @@
""")

__all__ += ['erf']

_erf_ = generate_layer_fn('erf')


Expand Down

0 comments on commit 9ff3ab7

Please sign in to comment.