Browse Source

update video rank

linfan 1 year ago
parent
commit
c178c4d528
1 changed files with 1 additions and 23 deletions
  1. 1 23
      video_rank.py

+ 1 - 23
video_rank.py

@@ -661,34 +661,12 @@ def video_new_rank2(data, size, top_K, flow_pool_P, ab_code, mid, exp_config=Non
                         if sort_index == 10:
                             total_score = score_result[i][0]
                         else:
+                            return_score  = 0.000000001
                             if len(video_score_str)>= sort_index and  len(video_score_str)>0:
                                 return_score = video_score_str[sort_index]
-                            else:
-                                return_score = 0.000000001
                             total_score = return_score * score_result[i][0]
                         rec_recall_item_list[i]['sort_score'] = total_score
                         print("total_score:", total_score, " model score :", score_result[i][0], "return_score:", return_score)
-                try:
-                    if video_scores[i] is None and len(score_result[i])>0:
-                        return_score = 0.000000001
-                        # sore_index :10 = model score
-                        if sort_index == 10:
-                            total_score = score_result[i][0]
-                        else:
-                            total_score = return_score * score_result[i][0]
-                        rec_recall_item_list[i]['sort_score'] = total_score
-                    else:
-                        video_score_str = json.loads(video_scores[i])
-                        # sore_index :10 = model score
-                        if sort_index == 10:
-                            total_score = score_result[i][0]
-                        else:
-                            return_score = 0.000000001
-                            if len(video_score_str)>= sort_index and  len(video_score_str)>0:
-                                return_score = video_score_str[sort_index]
-                            total_score = return_score * score_result[i][0]
-                        rec_recall_item_list[i]['sort_score'] = total_score
-                        print("total_score:", total_score, " model score :", score_result[i][0], "return_score:", return_score)return_score
                 except Exception as e:
                     print('exception: {}:', e)
                     if sort_index == 10: