Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
tsoc
DataAnalysis
Commits
30a01d1e
Commit
30a01d1e
authored
Mar 16, 2026
by
sharkgene@qq.com
Browse files
add key columns
parent
46a3249f
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
16 additions
and
5 deletions
+16
-5
.plot_comparison.py.swp
.plot_comparison.py.swp
+0
-0
.~t.xlsx
.~t.xlsx
+0
-0
data_config.json
data_config.json
+3
-2
plot_comparison.py
plot_comparison.py
+13
-3
t.xlsx
t.xlsx
+0
-0
No files found.
.plot_comparison.py.swp
View file @
30a01d1e
No preview for this file type
.~t.xlsx
0 → 100644
View file @
30a01d1e
File added
data_config.json
View file @
30a01d1e
...
...
@@ -4,11 +4,12 @@
"模型"
:
[]
},
"distinguish"
:
[
"模型"
,
"卡类型"
,
"卡数"
],
"distinguish"
:
[
"模型"
,
"卡数"
],
"group_by"
:
[[
"并发数"
],
[
"输入长度(tokens)"
,
"输出长度(tokens)"
]],
"colkey"
:
[
"卡类型"
,
"vLLM版本"
,
"V0/V1 Engine"
],
"files"
:
[
{
"file"
:
"t
est100
.xlsx"
,
"file"
:
"t.xlsx"
,
"sheets"
:
[],
"column_mapping"
:
{
},
...
...
plot_comparison.py
View file @
30a01d1e
...
...
@@ -70,9 +70,11 @@ def apply_filter(df, filter_dict):
df
=
df
[
df
[
filter_col
]
==
filter_values
]
return
df
def
generate_chart
(
df_subset
,
output_path
,
co
mpare_col
,
outer_group_cols
,
inner_group_cols
,
metric_cols
,
merge_groups
=
False
):
def
generate_chart
(
df_subset
,
output_path
,
co
lkey
,
outer_group_cols
,
inner_group_cols
,
metric_cols
,
merge_groups
=
False
):
df_subset
=
df_subset
.
copy
()
df_subset
[
compare_col
]
=
df_subset
[
'vLLM版本'
].
astype
(
str
)
+
'_'
+
df_subset
[
'V0/V1 Engine'
].
astype
(
str
)
compare_col
=
"ColKey"
df_subset
[
compare_col
]
=
df_subset
[
colkey
].
apply
(
lambda
x
:
'_'
.
join
(
x
.
dropna
().
astype
(
str
)),
axis
=
1
)
#df_subset[compare_col] = df_subset['vLLM版本'].astype(str) + '_' + df_subset['V0/V1 Engine'].astype(str)
all_group_cols
=
outer_group_cols
+
inner_group_cols
if
all_group_cols
:
...
...
@@ -288,6 +290,9 @@ if isinstance(group_by[0], list):
else
:
outer_group
=
[]
inner_group
=
group_by
colkey
=
config
.
get
(
'colkey'
,
[])
if
len
(
colkey
)
==
0
:
print
(
f
"column key error"
)
dist_combinations
=
df_renamed
.
groupby
(
dist_cols
).
size
().
reset_index
()
print
(
f
"
\n
将生成
{
len
(
dist_combinations
)
}
个图表..."
)
...
...
@@ -309,7 +314,12 @@ for idx, (_, dist_row) in enumerate(dist_combinations.iterrows()):
output_path
=
os
.
path
.
join
(
args
.
输出目录
,
output_filename
)
print
(
f
"[
{
idx
+
1
}
/
{
len
(
dist_combinations
)
}
] 生成图表:
{
output_filename
}
"
)
success
=
generate_chart
(
df_subset
,
output_path
,
'vLLM_Engine'
,
outer_group
,
inner_group
,
metric_cols
,
args
.
合并分组
)
for
c
in
metric_cols
:
try
:
df_subset
[
c
]
=
df_subset
[
c
].
astype
(
'float64'
)
except
Exception
as
e
:
print
(
f
"数据转换错误, 列名
{
c
}
, 错误信息
{
e
}
"
)
success
=
generate_chart
(
df_subset
,
output_path
,
colkey
,
outer_group
,
inner_group
,
metric_cols
,
args
.
合并分组
)
if
success
:
chart_count
+=
1
...
...
t.xlsx
0 → 100644
View file @
30a01d1e
File added
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment