linfan 1 year ago
parent
commit
597ce47e5d
2 changed files with 5 additions and 4 deletions
  1. 2 1
      video_rank.py
  2. 3 3
      video_recall.py

+ 2 - 1
video_rank.py

@@ -747,7 +747,8 @@ def video_sanke_rank(data, size, top_K, flow_pool_P, ab_Code=''):
                     cur_recall_num+=1
                     if cur_recall_num>=per_limt_num:
                         break
-
+    print("rov_recall_rank:")
+    print(rov_recall_rank)
     #rov_recall_rank = region_h_recall_rank + region_24h_recall_rank + \
     #                  rule_24h_recall_rank + rule_24h_dup_recall_rank
     # 流量池

+ 3 - 3
video_recall.py

@@ -2490,14 +2490,14 @@ class PoolRecall(object):
         recall_dict  = {}
         video_ids = []
         if data is not None:
-            json_result = json.loads(data)
+            json_result = data.split(",")
             # print("json_result:", json_result)
             for per_item in json_result:
                 try:
-                    vid = int(per_item[0])
+                    vid = int(per_item)
                     video_ids.append(vid)
                     recall_dict[vid] = {'videoId': vid, 'flowPool': '',
-                         'rovScore': per_item[1], 'pushFrom': config_.PUSH_FROM['sim_hot_vid_recall'],
+                         'rovScore': 0.0, 'pushFrom': config_.PUSH_FROM['sim_hot_vid_recall'],
                          'abCode': self.ab_code}
                 except Exception as e:
                     continue