v1_pipline.sh 660 B

12345678910111213141516171819202122232425262728293031
  1. #!/bin/bash
  2. abs_path=$(cd `dirname $0`; pwd)
  3. feat_file=""
  4. end_date=$(date +%Y%m%d -d "-2 $days day")
  5. if(($#==1))
  6. then
  7. feat_file=$1
  8. elif(($#==2))
  9. then
  10. feat_file=$1
  11. end_date=$2
  12. else
  13. exit -1
  14. fi
  15. # 1. vocab
  16. vocab_py="${abs_path}/../../src/get_fm_feature_name_v1.py"
  17. vocab_file="${abs_path}/../../vocab/vocab_v1_${end_date}.txt"
  18. echo `date` "python3 $vocab_py --all $feat_file --output $vocab_file"
  19. python3 $vocab_py --all $feat_file --output $vocab_file &
  20. wait
  21. sleep 30s
  22. # 2. sample
  23. sample_sh="${abs_path}/rov_sample_v1.sh"
  24. echo `date` "sh +x $sample_sh $end_date $end_date $vocab_file"
  25. sh +x $sample_sh $end_date $end_date $vocab_file &
  26. wait
  27. sleep 30s