liqian 3 years ago
parent
commit
f1b7c47876
1 changed files with 2 additions and 2 deletions
  1. 2 2
      recommend.py

+ 2 - 2
recommend.py

@@ -372,7 +372,7 @@ def video_homepage_recommend(mid, uid, size, app_type, algo_type, client_info, a
             top_K = config_.K
             flow_pool_P = config_.P
         else:
-            exp_item_id_list = [item.get('expItemId') for item in ab_exp_info]
+            exp_item_id_list = [int(item.get('expItemId')) for item in ab_exp_info]
             if config_.EXP_ITEM_ID['rec_size'] in exp_item_id_list:
                 config_value = ab_exp_info[exp_item_id_list.index(config_.EXP_ITEM_ID['rec_size'])].get('configValue')
                 size = config_value.get('size', 4)
@@ -415,7 +415,7 @@ def video_relevant_recommend(video_id, mid, uid, size, app_type, ab_exp_info):
         top_K = config_.K
         flow_pool_P = config_.P
     else:
-        exp_item_id_list = [item.get('expItemId') for item in ab_exp_info]
+        exp_item_id_list = [int(item.get('expItemId')) for item in ab_exp_info]
         if config_.EXP_ITEM_ID['rec_size'] in exp_item_id_list:
             config_value = ab_exp_info[exp_item_id_list.index(config_.EXP_ITEM_ID['rec_size'])].get('configValue')
             size = config_value.get('size', 4)