|
@@ -318,6 +318,9 @@ def put_analysis_report_to_html(args, df_clean, df_predict, df_accuracy):
|
|
|
agg_dict['deviationAssessment'] = [np.nanmean, np.nansum]
|
|
|
rename_cols.append('考核分数平均值')
|
|
|
rename_cols.append('考核总分数')
|
|
|
+ if 'qualificationRate' in df_accuracy.columns:
|
|
|
+ agg_dict['qualificationRate'] = [np.nanmean]
|
|
|
+ rename_cols.append('合格率平均值')
|
|
|
# 进行分组聚合,如果有需要聚合的列
|
|
|
summary_df = df_accuracy.groupby('model').agg(agg_dict).reset_index()
|
|
|
summary_df.columns = rename_cols
|
|
@@ -449,7 +452,7 @@ def put_analysis_report_to_html(args, df_clean, df_predict, df_accuracy):
|
|
|
if not os.path.exists(directory):
|
|
|
os.makedirs(directory)
|
|
|
file_path = os.path.join(directory, filename)
|
|
|
- path = f"http://ds3:10010/{filename}"
|
|
|
+ path = f"http://ds1:10010/{filename}"
|
|
|
# 将 HTML 内容写入文件
|
|
|
with open(file_path, "w", encoding="utf-8") as f:
|
|
|
f.write(html_content)
|