|
@@ -49,8 +49,8 @@ max_minute=20
|
|
global_init() {
|
|
global_init() {
|
|
# 获取当前小时,确定需要使用的数据分区范围
|
|
# 获取当前小时,确定需要使用的数据分区范围
|
|
local current_hour="$(date +%H)"
|
|
local current_hour="$(date +%H)"
|
|
- if [ $current_hour -le 05 ]; then
|
|
|
|
- train_begin_str=${today_early_1}14
|
|
|
|
|
|
+ if [ $current_hour -le 06 ]; then
|
|
|
|
+ train_begin_str=${today_early_1}08
|
|
train_end_str=${today_early_1}21
|
|
train_end_str=${today_early_1}21
|
|
predict_begin_str=${today_early_1}22
|
|
predict_begin_str=${today_early_1}22
|
|
predict_end_str=${today_early_1}23
|
|
predict_end_str=${today_early_1}23
|
|
@@ -60,7 +60,7 @@ global_init() {
|
|
|
|
|
|
local_model_file_path=${MODEL_HOME}/${model_name}_${train_end_str}.txt
|
|
local_model_file_path=${MODEL_HOME}/${model_name}_${train_end_str}.txt
|
|
local_change_model_file_path=${MODEL_HOME}/${model_name}_${train_end_str}_change.txt
|
|
local_change_model_file_path=${MODEL_HOME}/${model_name}_${train_end_str}_change.txt
|
|
- max_hour=12
|
|
|
|
|
|
+ max_hour=08
|
|
elif [ $current_hour -ge 16 ]; then
|
|
elif [ $current_hour -ge 16 ]; then
|
|
train_begin_str=${today_early_1}22
|
|
train_begin_str=${today_early_1}22
|
|
train_end_str=${today}13
|
|
train_end_str=${today}13
|
|
@@ -225,6 +225,8 @@ calc_online_model_auc() {
|
|
online_auc=`cat ${PREDICT_PATH}/${model_name}_${train_end_str}_online.txt | /root/sunmingze/AUC/AUC`
|
|
online_auc=`cat ${PREDICT_PATH}/${model_name}_${train_end_str}_online.txt | /root/sunmingze/AUC/AUC`
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+
|
|
|
|
+# 计算新模型AUC
|
|
calc_new_model_auc() {
|
|
calc_new_model_auc() {
|
|
$HADOOP fs -text ${predictBucketFeaturePath}/*/* | ${FM_HOME}/bin/fm_predict -m ${local_model_file_path} -dim 8 -core 8 -out ${PREDICT_PATH}/${model_name}_${train_end_str}_new.txt
|
|
$HADOOP fs -text ${predictBucketFeaturePath}/*/* | ${FM_HOME}/bin/fm_predict -m ${local_model_file_path} -dim 8 -core 8 -out ${PREDICT_PATH}/${model_name}_${train_end_str}_new.txt
|
|
new_auc=`cat ${PREDICT_PATH}/${model_name}_${train_end_str}_new.txt | /root/sunmingze/AUC/AUC`
|
|
new_auc=`cat ${PREDICT_PATH}/${model_name}_${train_end_str}_new.txt | /root/sunmingze/AUC/AUC`
|
|
@@ -356,15 +358,15 @@ main() {
|
|
|
|
|
|
model_train
|
|
model_train
|
|
|
|
|
|
- auc_compare
|
|
|
|
|
|
+ # auc_compare
|
|
|
|
|
|
model_to_online_format
|
|
model_to_online_format
|
|
|
|
|
|
- # model_upload_oss
|
|
|
|
|
|
+ model_upload_oss
|
|
|
|
|
|
- # model_local_back
|
|
|
|
|
|
+ model_local_back
|
|
|
|
|
|
- # success_inform
|
|
|
|
|
|
+ success_inform
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|