|
@@ -76,17 +76,7 @@ check_run_status() {
|
|
|
}
|
|
|
|
|
|
send_success_upload_msg(){
|
|
|
- local msg=" 广告模型文件更新完成"
|
|
|
- msg+="\n\t - 老模型Top10差异平均值: ${old_incr_rate_avg}"
|
|
|
- msg+="\n\t - 新模型Top10差异平均值: ${new_incr_rate_avg}"
|
|
|
- msg+="\n\t - 模型在HDFS中的路径: ${model_save_path}"
|
|
|
- msg+="\n\t - 模型上传OSS中的路径: ${MODEL_OSS_PATH}/${model_name}.tar.gz"
|
|
|
-
|
|
|
- local top10_msg="| CID | 老模型 | 新模型 | \n| ---- | -------- | -------- | "
|
|
|
- for cid in "${!new_score_map[@]}"; do
|
|
|
- top10_msg="${top10_msg} \n| ${cid} | ${old_score_map[$cid]} | ${new_score_map[$cid]} | "
|
|
|
- done
|
|
|
- /root/anaconda3/bin/python ${sh_path}/ad_monitor_util.py --level info --msg "${msg}" --start "${start_time}" --elapsed "${elapsed}" --top10 "${top10_msg}"
|
|
|
+
|
|
|
}
|
|
|
|
|
|
init() {
|
|
@@ -248,7 +238,7 @@ calc_model_predict() {
|
|
|
echo "新模型Top10差异平均值: ${new_incr_rate_avg}"
|
|
|
echo "新老模型分数对比: "
|
|
|
for cid in "${!new_score_map[@]}"; do
|
|
|
- echo "\t\t CID: $cid, 老模型分数: ${old_score_map[$cid]}, 新模型分数: ${new_score_map[$cid]}"
|
|
|
+ echo "\t CID: $cid, 老模型分数: ${old_score_map[$cid]}, 新模型分数: ${new_score_map[$cid]}"
|
|
|
done
|
|
|
}
|
|
|
|
|
@@ -327,7 +317,18 @@ model_upload_oss() {
|
|
|
|
|
|
echo -e "$LOG_PREFIX -- 模型更新完成 -- 模型更新成功: 耗时 $elapsed"
|
|
|
|
|
|
- send_success_upload_msg
|
|
|
+ # 发送更新成功通知
|
|
|
+ local msg=" 广告模型文件更新完成"
|
|
|
+ msg+="\n\t - 老模型Top10差异平均值: ${old_incr_rate_avg}"
|
|
|
+ msg+="\n\t - 新模型Top10差异平均值: ${new_incr_rate_avg}"
|
|
|
+ msg+="\n\t - 模型在HDFS中的路径: ${model_save_path}"
|
|
|
+ msg+="\n\t - 模型上传OSS中的路径: ${MODEL_OSS_PATH}/${model_name}.tar.gz"
|
|
|
+
|
|
|
+ local top10_msg="| CID | 老模型 | 新模型 | \n| ---- | -------- | -------- | "
|
|
|
+ for cid in "${!new_score_map[@]}"; do
|
|
|
+ top10_msg="${top10_msg} \n| ${cid} | ${old_score_map[$cid]} | ${new_score_map[$cid]} | "
|
|
|
+ done
|
|
|
+ /root/anaconda3/bin/python ${sh_path}/ad_monitor_util.py --level info --msg "${msg}" --start "${start_time}" --elapsed "${elapsed}" --top10 "${top10_msg}"
|
|
|
}
|
|
|
|
|
|
# 主方法
|