فهرست منبع

update video rank

linfan 1 سال پیش
والد
کامیت
5318bcdcc5
1فایلهای تغییر یافته به همراه4 افزوده شده و 1 حذف شده
  1. 4 1
      video_rank.py

+ 4 - 1
video_rank.py

@@ -658,6 +658,7 @@ def video_new_rank2(data, size, top_K, flow_pool_P, ab_code, mid, exp_config=Non
                         rec_recall_item_list[i]['sort_score'] = total_score
                         rec_recall_item_list[i]['base_rov_score'] = 0.0
                         rec_recall_item_list[i]['share_score'] = return_score
+                        rec_recall_item_list[i]['model_score'] = score_result[i][0]
                     else:
                         video_score_str = json.loads(video_scores[i])
                         # sore_index :10 = model score
@@ -673,6 +674,7 @@ def video_new_rank2(data, size, top_K, flow_pool_P, ab_code, mid, exp_config=Non
                         rec_recall_item_list[i]['sort_score'] = total_score
                         rec_recall_item_list[i]['base_rov_score'] = video_score_str[0]
                         rec_recall_item_list[i]['share_score'] = return_score
+                        rec_recall_item_list[i]['model_score'] = score_result[i][0]
                 except Exception as e:
                     #print('exception: {}:', e)
                     return_score = 0.000000001
@@ -681,8 +683,9 @@ def video_new_rank2(data, size, top_K, flow_pool_P, ab_code, mid, exp_config=Non
                     else:
                         total_score = return_score * 0.00000001
                     rec_recall_item_list[i]['sort_score'] = total_score
-                    rec_recall_item_list[i]['base_rov_score'] = video_score_str[0]
+                    rec_recall_item_list[i]['base_rov_score'] = 0
                     rec_recall_item_list[i]['share_score'] = return_score
+                    rec_recall_item_list[i]['model_score'] = 0.00000001
                 rec_recall_item_list[i]['flag_call_service'] = 1
             rov_recall_rank = sorted(rec_recall_item_list, key=lambda k: k.get('sort_score', 0), reverse=True)
         else: