Skip to content

Commit d689722

Browse files
Olivia-liufacebook-github-bot
authored andcommitted
Make compare_results() import path public (#5225)
Summary: Pull Request resolved: #5225 `compare_results()` is a util function that is used outside of the inspector tool itself. We will also probably mention it in PTC as a public util function. This diff makes it "public" aka removes the underscore prefix in the import paths. Reviewed By: dbort Differential Revision: D62450959 fbshipit-source-id: 5688a79001b76c2e99ac76a9238828c6031f7291
1 parent 6ac1365 commit d689722

File tree

5 files changed

+17
-6
lines changed

5 files changed

+17
-6
lines changed

devtools/inspector/TARGETS

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@ python_binary(
2626
main_function = ".inspector_cli.main",
2727
main_src = "inspector_cli.py",
2828
deps = [
29-
":inspector_utils",
3029
"//executorch/devtools:lib",
30+
"//executorch/devtools/inspector:lib",
3131
],
3232
)
3333

devtools/inspector/__init__.py

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,21 @@
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+
# pyre-unsafe
8+
79
from executorch.devtools.inspector._inspector import (
810
Event,
911
EventBlock,
1012
Inspector,
1113
PerfData,
1214
)
13-
from executorch.devtools.inspector._inspector_utils import TimeScale
15+
from executorch.devtools.inspector._inspector_utils import compare_results, TimeScale
1416

15-
__all__ = ["Event", "EventBlock", "Inspector", "PerfData", "TimeScale"]
17+
__all__ = [
18+
"Event",
19+
"EventBlock",
20+
"Inspector",
21+
"PerfData",
22+
"compare_results",
23+
"TimeScale",
24+
]

devtools/inspector/inspector_cli.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,12 @@
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+
# pyre-unsafe
8+
79
import argparse
810

911
from executorch.devtools import Inspector
10-
from executorch.devtools.inspector._inspector_utils import compare_results, TimeScale
12+
from executorch.devtools.inspector import compare_results, TimeScale
1113

1214

1315
def main() -> None:

docs/source/sdk-debugging.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ We've also provided a simple set of utilities that let users perform quality ana
6767

6868

6969
```python
70-
from executorch.devtools.inspector._inspector_utils import compare_results
70+
from executorch.devtools.inspector import compare_results
7171

7272
# Run a simple quality analysis between the model outputs sourced from the
7373
# runtime and a set of reference outputs.

examples/apple/coreml/scripts/inspector_cli.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
from pathlib import Path
1010

1111
from executorch.devtools import Inspector
12-
from executorch.devtools.inspector._inspector_utils import compare_results
12+
from executorch.devtools.inspector import compare_results
1313

1414

1515
def get_root_dir_path() -> Path:

0 commit comments

Comments
 (0)