#!/bin/sh
set -e
set -x

day=$1
train_path=$2
model_name=$3
output_file=$4
bias=$5
HADOOP="/opt/apps/HADOOP-COMMON/hadoop-common-current/bin/hadoop"
$HADOOP fs -text ${train_path}/${day}/* | /root/sunmingze/alphaFM/bin/fm_predict -m model/$model_name -dim ${bias} -core 8 -out predict/${output_file}_$day.txt
cat predict/${output_file}_$day.txt | /root/sunmingze/AUC/AUC


# nohup sh 03_predict.sh 20240611 /dw/recommend/model/16_train_data/ model_aka0_20240610.txt model_aka0_20240610 0 >p3_model_aka0.log 2>&1 &
# nohup sh 03_predict.sh 20240611 /dw/recommend/model/16_train_data/ model_aka4_20240610.txt model_aka4_20240610 4 >p3_model_aka4.log 2>&1 &
# nohup sh 03_predict.sh 20240613 /dw/recommend/model/16_train_data/ model_aka8_20240612.txt model_aka8_20240612 8 >p3_model_aka8_12.log 2>&1 &


# nohup sh 03_predict.sh 20240615 /dw/recommend/model/16_train_data_print_online_merge/ model_aka8_20240608.txt model_aka8_20240608 8 >p3_model_aka8_on.log 2>&1 &




# cat tmpfile | /root/sunmingze/alphaFM/bin/fm_predict -m model/model_aka8_20240608.txt -dim 8 -core 1 -out tmpfile_out.txt