Browse Source

update video_rank

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

+ 1 - 1
video_rank.py

@@ -993,7 +993,7 @@ def video_sank_pos_rank(data, size, top_K, flow_pool_P, ab_Code='', exp_config=N
                         vid = recall_item['videoId']
                         if vid in select_ids:
                             continue
-                        #recall_item['rand'] = rand_num
+                        recall_item['rand'] = rand_num
                         rov_recall_rank.append(recall_item)
                         select_ids.add(vid)
                         if per_recall_name in exp_recall_dict:

+ 3 - 3
video_recall.py

@@ -2834,7 +2834,7 @@ class PoolRecall(object):
         if self.video_id is None:
             return  []
         recall_key = "rv:"+ str(self.video_id)
-        #print("recall_key:", recall_key)
+        print("recall_key:", recall_key)
         data = self.redis_helper.get_data_from_redis(key_name=recall_key)
 
         #print(data)
@@ -2843,7 +2843,7 @@ class PoolRecall(object):
         video_ids = []
         if data is not None:
             json_result = json.loads(data)
-            #print("json_result:", json_result)
+            print("json_result:", json_result)
             for per_item in json_result:
                 try:
                     vid = int(per_item[0])
@@ -2861,7 +2861,7 @@ class PoolRecall(object):
                 recall_num = int(exp_config['recall_get_num'])
         except:
             recall_num = 20
-        #print("recall_num:", recall_num)
+        print("recall_num:", recall_num)
         video_ids = video_ids[:recall_num]
         #print(video_ids)
         filter_ = FilterVideos(request_id=self.request_id,