|
@@ -99,7 +99,19 @@ $HADOOP fs -text ${bucketFeatureSavePath}/${today}/* | ${FM_HOME}/bin/fm_predict
|
|
|
|
|
|
|
|
|
online_auc=`cat ${PREDICT_PATH}/${model_name}_${today}_online.txt | /root/sunmingze/AUC/AUC`
|
|
|
+if [ $? -ne 0 ]; then
|
|
|
+ echo "线上模型AUC计算失败"
|
|
|
+ /root/anaconda3/bin/python ad/ad_monitor_util.py "线上模型AUC计算失败"
|
|
|
+ exit 1
|
|
|
+fi
|
|
|
+
|
|
|
new_auc=`cat ${PREDICT_PATH}/${model_name}_${today}_new.txt | /root/sunmingze/AUC/AUC`
|
|
|
+if [ $? -ne 0 ]; then
|
|
|
+ echo "新模型AUC计算失败"
|
|
|
+ /root/anaconda3/bin/python ad/ad_monitor_util.py "新模型AUC计算失败"
|
|
|
+ exit 1
|
|
|
+fi
|
|
|
+
|
|
|
if [ "$online_auc" \< "$new_auc" ]; then
|
|
|
echo "新模型优于线上模型: 线上模型AUC: ${online_auc}, 新模型AUC: ${new_auc}"
|
|
|
/root/anaconda3/bin/python ad/ad_monitor_util.py "新模型优于线上模型: 线上模型AUC: ${online_auc}, 新模型AUC: ${new_auc}"
|