Skip to content

Commit 3666680

Browse files
authored
Fix the print (#11944)
clean up the print from common.ts add --debug flag to execuTorch script. --------- Signed-off-by: Yang Wang <[email protected]>
1 parent 5335eeb commit 3666680

File tree

2 files changed

+12
-10
lines changed

2 files changed

+12
-10
lines changed

.ci/scripts/benchmark_tooling/analyze_benchmark_stability.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,7 @@ def analyze_latency_stability( # noqa: C901
7171
reference_file=None,
7272
output_dir="stability_analysis_results",
7373
verbose_level=0,
74+
debug=False,
7475
):
7576
print_section_header(f"Analyzing Stability Against Metric '{target_metric}'")
7677
print(f"Primary dataset: {primary_file}")
@@ -86,6 +87,9 @@ def analyze_latency_stability( # noqa: C901
8687
primary_datasets = {}
8788
documents = read_excel_with_json_header(primary_file)
8889

90+
if debug:
91+
print(f"[Debug Mode] Printing documents: {documents}")
92+
8993
for document in documents:
9094
sheetName = document.get("sheetName", None)
9195
df = document.get("df", None)
@@ -1525,6 +1529,13 @@ def main():
15251529
default="stability_analysis_results",
15261530
help="Directory to save analysis results (default: stability_analysis_results)",
15271531
)
1532+
1533+
parser.add_argument(
1534+
"--debug",
1535+
action="store_true",
1536+
help="Enable debug mode (default: False)",
1537+
)
1538+
15281539
parser.add_argument(
15291540
"--verbose-level",
15301541
type=int,
@@ -1542,6 +1553,7 @@ def main():
15421553
args.reference_file,
15431554
args.output_dir,
15441555
args.verbose_level,
1556+
args.debug,
15451557
)
15461558

15471559

.ci/scripts/benchmark_tooling/common.py

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -38,13 +38,3 @@ def read_all_csv_with_metadata(folder_path: str) -> List[Dict[str, Any]]:
3838
results.append({"groupInfo": meta, "df": df, "sheetName": fname})
3939
print(f"successfully fetched {len(results)} sheets from {folder_path}")
4040
return results
41-
42-
43-
import logging
44-
45-
logging.basicConfig(level=logging.INFO)
46-
47-
# For Excel files (assuming the Excel file is in the current directory)
48-
file_path = "./private.xlsx"
49-
res = read_excel_with_json_header(file_path)
50-
logging.info(res)

0 commit comments

Comments
 (0)