Blame view

offline_tasks/run.sh 618 Bytes
1721766b   tangwang   offline tasks
1
2
  cd /home/tw/recommendation/offline_tasks
  
a1f370ee   tangwang   offline tasks
3
4
  # # 查看配置指南
  # cat UPDATE_CONFIG_GUIDE.md
1721766b   tangwang   offline tasks
5
  
a1f370ee   tangwang   offline tasks
6
  # 2. 测试连接
14f3dcbe   tangwang   offline tasks
7
  # python3 test_connection.py
1721766b   tangwang   offline tasks
8
  
40442baf   tangwang   offline tasks: fi...
9
10
11
12
13
14
  ps -ef|grep run_all.py | awk '{print $2}' | xargs kill -9
  ps -ef|grep recommendation | awk '{print $2}' | xargs kill -9
  rm output/* -rf
  rm logs/* -rf
  
  
a1f370ee   tangwang   offline tasks
15
16
17
18
19
20
21
  # 3. 调试模式运行(小数据量)
  python3 run_all.py --lookback_days 7 --top_n 10 --debug
  
  mv output output_debug
  mkdir output
  
  # # 4. 生产模式运行(大数据量)
14f3dcbe   tangwang   offline tasks
22
  python3 run_all.py --lookback_days 730 --top_n 50 --debug
a1f370ee   tangwang   offline tasks
23
24
25
  
  # 5. 加载到Redis
  python3 scripts/load_index_to_redis.py --redis-host localhost
14f3dcbe   tangwang   offline tasks