Browse Source

Merge branch 'sort_debug_20230811', remote-tracking branch 'origin' into test

linfan 1 year ago
parent
commit
5cfdd5329c
1 changed files with 4 additions and 1 deletions
  1. 4 1
      video_rank.py

+ 4 - 1
video_rank.py

@@ -659,6 +659,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
@@ -674,6 +675,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
@@ -682,8 +684,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: