Skip to content

Commit 0affcf2

Browse files
guangy10facebook-github-bot
authored andcommitted
Improve module import (#235)
Summary: Pull Request resolved: #235 Added `__init__.py`. Prepare for running tests with `pytest` Reviewed By: kirklandsign Differential Revision: D49062889 fbshipit-source-id: 71e70c19c8527dfec3fbb7f03c4e90b82d4eadee
1 parent 4f297a5 commit 0affcf2

File tree

3 files changed

+18
-5
lines changed

3 files changed

+18
-5
lines changed

examples/export/__init__.py

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# Copyright (c) Meta Platforms, Inc. and affiliates.
2+
# All rights reserved.
3+
#
4+
# This source code is licensed under the BSD-style license found in the
5+
# LICENSE file in the root directory of this source tree.
6+
7+
from .utils import export_to_edge, export_to_exec_prog, save_pte_program
8+
9+
__all__ = [
10+
"export_to_edge",
11+
"export_to_exec_prog",
12+
"save_pte_program",
13+
]

examples/models/__init__.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
# This source code is licensed under the BSD-style license found in the
55
# LICENSE file in the root directory of this source tree.
66

7+
from .model_factory import EagerModelFactory
78

89
MODEL_NAME_TO_MODEL = {
910
"mul": ("toy_model", "MulModule"),
@@ -21,5 +22,7 @@
2122
"resnet50": ("resnet", "ResNet50Model"),
2223
}
2324

24-
25-
__all__ = [MODEL_NAME_TO_MODEL]
25+
__all__ = [
26+
"EagerModelFactory",
27+
"MODEL_NAME_TO_MODEL",
28+
]

examples/models/mobilebert/model.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,6 @@
1212

1313
from ..model_base import EagerModelBase
1414

15-
FORMAT = "[%(filename)s:%(lineno)s] %(message)s"
16-
logging.basicConfig(format=FORMAT)
17-
1815

1916
class MobileBertModelExample(EagerModelBase):
2017
def __init__(self):

0 commit comments

Comments
 (0)