Joe hai 9 meses
pai
achega
e8d9fcb948
Modificáronse 1 ficheiros con 19 adicións e 19 borrados
  1. 19 19
      qiaojialiang/change_oss.sh

+ 19 - 19
qiaojialiang/change_oss.sh

@@ -44,23 +44,23 @@ HADOOP=/opt/apps/HADOOP-COMMON/hadoop-common-current/bin/hadoop
 OSS_PATH=oss://art-recommend.oss-cn-hangzhou.aliyuncs.com/zhangbo/
 
 
-cat /root/joe/recommend-emr-dataprocess/model/model_nba8_0709_0713.txt |
-  awk -F " " '{
-      if (NR == 1) {
-          print $1"\t"$2
-      } else {
-          split($0, fields, " ");
-          OFS="\t";
-          line=""
-          for (i = 1; i <= 10 && i <= length(fields); i++) {
-              line = (line ? line "\t" : "") fields[i];
-          }
-              print line
-          }
-      }' > /root/joe/recommend-emr-dataprocess/model/model_nba8_0709_0713_change.txt
-if [ $? -ne 0 ]; then
-   echo "新模型文件格式转换失败"
-fi
+#cat /root/joe/recommend-emr-dataprocess/model/model_nba8_0709_0713.txt |
+#  awk -F " " '{
+#      if (NR == 1) {
+#          print $1"\t"$2
+#      } else {
+#          split($0, fields, " ");
+#          OFS="\t";
+#          line=""
+#          for (i = 1; i <= 10 && i <= length(fields); i++) {
+#              line = (line ? line "\t" : "") fields[i];
+#          }
+#              print line
+#          }
+#      }' > /root/joe/recommend-emr-dataprocess/model/model_nba8_0709_0713_change.txt
+#if [ $? -ne 0 ]; then
+#   echo "新模型文件格式转换失败"
+#fi
 # 4.1.2 模型文件上传OSS
 online_model_path=${OSS_PATH}/${model_name}.txt
 $HADOOP fs -test -e ${online_model_path}
@@ -70,12 +70,12 @@ if [ $? -eq 0 ]; then
 else
     echo "数据不存在"
 fi
-$HADOOP fs -put /root/joe/recommend-emr-dataprocess/model/model_nba8_0709_0713_change.txt ${online_model_path}
+$HADOOP fs -put /root/joe/recommend-emr-dataprocess/model/model_nba8_20240716_change.txt ${online_model_path}
 if [ $? -eq 0 ]; then
     echo "推荐模型文件至OSS成功"
     # 4.1.3 本地保存最新的线上使用的模型,用于下一次的AUC验证
     cp -f ${LAST_MODEL_HOME}/model_online.txt ${LAST_MODEL_HOME}/model_online_$(date +\%Y\%m\%d).txt
-    cp -f /root/joe/recommend-emr-dataprocess/model/model_nba8_0709_0713.txt ${LAST_MODEL_HOME}/model_online.txt
+    cp -f /root/joe/recommend-emr-dataprocess/model/model_nba8_20240716.txt ${LAST_MODEL_HOME}/model_online.txt
     if [ $? -ne 0 ]; then
         echo "模型备份失败"
     fi