Skip to content

Commit 5dd47f7

Browse files
zzhfzChamberlain0w0
authored andcommitted
refactor: unify summary table naming and fix review issues
1 parent 1b230ce commit 5dd47f7

File tree

5 files changed

+10
-19
lines changed

5 files changed

+10
-19
lines changed

dashboard/pages/communication.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,9 @@
1212
plot_metric_vs_size,
1313
plot_comparison_matrix,
1414
create_gauge_chart,
15-
create_summary_table,
1615
plot_timeseries_auto,
1716
create_summary_table_infer,
17+
create_summary_table_comm,
1818
)
1919

2020
init_page("通信测试分析 | InfiniMetrics", "🔗")
@@ -293,7 +293,7 @@ def main():
293293
f"{run['operation']} ({run['device_used']} GPUs) - 配置详情"
294294
):
295295
# Create summary table
296-
summary_df = create_summary_table(run.get("data", {}))
296+
summary_df = create_summary_table_comm(run.get("data", {}))
297297
st.dataframe(
298298
summary_df,
299299
use_container_width=True,

dashboard/pages/operator.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ def main():
9595
st.write(f"- 加速卡: {acc.get('model', 'Unknown')}")
9696
st.write(f"- 显存: {acc.get('memory_gb_per_card', '?')} GB")
9797
st.write(f"- CUDA版本: {acc.get('cuda', 'Unknown')}")
98-
except:
98+
except Exception:
9999
st.json(env)
100100

101101
with tab3:

dashboard/utils/visualizations/__init__.py

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,9 @@
3131

3232
# Summary tables
3333
from .summary_tables import (
34-
create_comm_summary_table,
35-
create_infer_summary_table,
36-
create_ops_summary_table,
34+
create_summary_table_comm,
35+
create_summary_table_infer,
36+
create_summary_table_ops,
3737
)
3838

3939
# Hardware functions
@@ -57,11 +57,6 @@
5757
render_config_details,
5858
)
5959

60-
# Backward-compatible aliases
61-
create_summary_table = create_comm_summary_table
62-
create_summary_table_infer = create_infer_summary_table
63-
create_summary_table_ops = create_ops_summary_table
64-
6560
__all__ = [
6661
# Base
6762
"create_gauge_chart",
@@ -73,10 +68,7 @@
7368
"render_inference_metrics",
7469
"render_memory_gauge",
7570
# Summary tables
76-
"create_comm_summary_table",
77-
"create_infer_summary_table",
78-
"create_ops_summary_table",
79-
"create_summary_table",
71+
"create_summary_table_comm",
8072
"create_summary_table_infer",
8173
"create_summary_table_ops",
8274
# Hardware

dashboard/utils/visualizations/operator.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
import streamlit as st
55
import pandas as pd
66
import plotly.graph_objects as go
7-
import plotly.express as px
87

98
from .base import create_gauge_chart
109

dashboard/utils/visualizations/summary_tables.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
from typing import Dict, Any
66

77

8-
def create_comm_summary_table(test_result: Dict[str, Any]) -> pd.DataFrame:
8+
def create_summary_table_comm(test_result: Dict[str, Any]) -> pd.DataFrame:
99
"""Create summary table for communication tests."""
1010
summary_data = []
1111

@@ -86,7 +86,7 @@ def create_comm_summary_table(test_result: Dict[str, Any]) -> pd.DataFrame:
8686
return pd.DataFrame(summary_data)
8787

8888

89-
def create_infer_summary_table(test_result: dict) -> pd.DataFrame:
89+
def create_summary_table_infer(test_result: dict) -> pd.DataFrame:
9090
"""Create summary table for inference tests."""
9191
rows = []
9292

@@ -141,7 +141,7 @@ def create_infer_summary_table(test_result: dict) -> pd.DataFrame:
141141
return pd.DataFrame(rows)
142142

143143

144-
def create_ops_summary_table(test_result: dict) -> pd.DataFrame:
144+
def create_summary_table_ops(test_result: dict) -> pd.DataFrame:
145145
"""Create summary table for operator tests."""
146146
rows = []
147147
cfg = test_result.get("config", {})

0 commit comments

Comments
 (0)