| 
					
				 | 
			
			
				@@ -0,0 +1,31 @@ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+#!/bin/sh 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+set -ex 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+start_date=$1 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+end_date=$2 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+model_name=$3 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+MODEL_PATH="./model/" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+SAMPLE_PATH=$4 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+bias=$5 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+HADOOP="/opt/apps/HADOOP-COMMON/hadoop-common-current/bin/hadoop" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+FM_TRAIN="/root/sunmingze/alphaFM/bin/fm_train" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+$HADOOP fs -text /dw/recommend/model/43_recsys_train_data/20240713/* | ${FM_TRAIN} -m /root/joe/recommend-emr-dataprocess/model/${model_name}_all_20240713.txt -dim ${bias} -core 8 -im /root/joe/recommend-emr-dataprocess/model/model_nba8_0709_0712.txt 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+current_date="$start_date" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+while [[ "$current_date" != "$end_date" ]]; do 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    echo -------"$current_date"---------- 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    yesterday=$(date -d "$current_date - 1 day" +%Y%m%d) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    echo model-day-$yesterday 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    echo data-day-$current_date 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    $HADOOP fs -text /dw/recommend/model/43_recsys_train_data/$current_date/* | ${FM_TRAIN} -m /root/joe/recommend-emr-dataprocess/model/${model_name}_all_$current_date.txt -dim ${bias} -core 8 -im $MODEL_PATH/${model_name}_all_$yesterday.txt 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    current_date=$(date -d "$current_date + 1 day" +%Y%m%d) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+done 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+# nohup sh 02_train_go.sh 20240714 20240715 model_nba8 /dw/recommend/model/43_recsys_train_data/ 1,1,8 > log/p2_model_bkb8_all.log 2>&1 & 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 |