#!/bin/bash source ~/.bash_profile conda activate rov-offline-py38 cd /data/rov-offline now_date=`date +"%Y%m%d"` echo "now_date: $now_date" # 1. 下载训练所用特征数据并做处理 echo "ad_feature_process start..." python ad_feature_process.py if [ $? -ne 0 ]; then msg = "[ERROR] ad_feature_process.py" echo $msg exit -1 fi echo "ad_feature_process end!" # 2. 对样本进行采样 echo "ad_feature_data_sample start..." python ad_feature_data_sample.py if [ $? -ne 0 ]; then msg = "[ERROR] ad_feature_data_sample.py" echo $msg exit -1 fi echo "ad_feature_data_sample end!" # 3. 训练集和测试集生成 echo "ad_generate_train_test start..." python ad_generate_train_test.py if [ $? -ne 0 ]; then msg = "[ERROR] ad_generate_train_test.py" echo $msg exit -1 fi echo "ad_generate_train_test end!" # 4. 模型训练 echo "ad_xgboost_train start..." python ad_xgboost_train.py if [ $? -ne 0 ]; then msg = "[ERROR] ad_xgboost_train.py" echo $msg exit -1 fi echo "ad_xgboost_train end!" ## 5. 离线预测数据处理 #echo "ad_predict_video_data_process start..." #python ad_predict_video_data_process.py #if [ $? -ne 0 ]; #then # msg = "[ERROR] ad_predict_video_data_process.py" # echo $msg # exit -1 #fi #echo "ad_predict_video_data_process end!" # #echo "ad_predict_user_data_process start..." #python ad_predict_user_data_process.py #if [ $? -ne 0 ]; #then # msg = "[ERROR] ad_predict_user_data_process.py" # echo $msg # exit -1 #fi #echo "ad_predict_user_data_process end!" # #echo "ad_xgboost_predict_data_generate start..." #python ad_xgboost_predict_data_generate.py #if [ $? -ne 0 ]; #then # msg = "[ERROR] ad_xgboost_predict_data_generate.py" # echo $msg # exit -1 #fi #echo "ad_xgboost_predict_data_generate end!" ## 6. 离线预测 #echo "ad_xgboost_predict start..." #python ad_xgboost_predict.py #if [ $? -ne 0 ]; #then # msg = "[ERROR] ad_xgboost_predict.py" # echo $msg # exit -1 #fi #echo "ad_xgboost_predict end!"