|
@@ -358,11 +358,11 @@ def video_homepage_recommend(mid, uid, size, app_type, algo_type, client_info, a
|
|
|
algo_type=algo_type, client_info=client_info,
|
|
|
expire_time=12 * 3600)
|
|
|
# ab-test
|
|
|
- result = ab_test_op(rank_result=rank_result,
|
|
|
- ab_code_list=[config_.AB_CODE['position_insert']],
|
|
|
- app_type=app_type, mid=mid, uid=uid)
|
|
|
+ # result = ab_test_op(rank_result=rank_result,
|
|
|
+ # ab_code_list=[config_.AB_CODE['position_insert']],
|
|
|
+ # app_type=app_type, mid=mid, uid=uid)
|
|
|
# redis数据刷新
|
|
|
- update_redis_data(result=result, app_type=app_type, mid=mid, last_rov_recall_key=last_rov_recall_key,
|
|
|
+ update_redis_data(result=rank_result, app_type=app_type, mid=mid, last_rov_recall_key=last_rov_recall_key,
|
|
|
top_K=top_K, expire_time=12 * 3600)
|
|
|
|
|
|
else:
|
|
@@ -403,14 +403,14 @@ def video_homepage_recommend(mid, uid, size, app_type, algo_type, client_info, a
|
|
|
size=size, top_K=top_K, flow_pool_P=flow_pool_P,
|
|
|
algo_type=algo_type, client_info=client_info)
|
|
|
# ab-test
|
|
|
- result = ab_test_op(rank_result=rank_result,
|
|
|
- ab_code_list=[config_.AB_CODE['position_insert']],
|
|
|
- app_type=app_type, mid=mid, uid=uid)
|
|
|
+ # result = ab_test_op(rank_result=rank_result,
|
|
|
+ # ab_code_list=[config_.AB_CODE['position_insert']],
|
|
|
+ # app_type=app_type, mid=mid, uid=uid)
|
|
|
# redis数据刷新
|
|
|
- update_redis_data(result=result, app_type=app_type, mid=mid, last_rov_recall_key=last_rov_recall_key,
|
|
|
+ update_redis_data(result=rank_result, app_type=app_type, mid=mid, last_rov_recall_key=last_rov_recall_key,
|
|
|
top_K=top_K)
|
|
|
|
|
|
- return result
|
|
|
+ return rank_result
|
|
|
|
|
|
|
|
|
def video_relevant_recommend(video_id, mid, uid, size, app_type, ab_exp_info):
|
|
@@ -461,14 +461,14 @@ def video_relevant_recommend(video_id, mid, uid, size, app_type, ab_exp_info):
|
|
|
size=size, top_K=top_K, flow_pool_P=flow_pool_P,
|
|
|
algo_type='', client_info=None)
|
|
|
# ab-test
|
|
|
- result = ab_test_op(rank_result=rank_result,
|
|
|
- ab_code_list=[config_.AB_CODE['position_insert'], config_.AB_CODE['relevant_video_op']],
|
|
|
- app_type=app_type, mid=mid, uid=uid, head_vid=video_id, size=size)
|
|
|
+ # result = ab_test_op(rank_result=rank_result,
|
|
|
+ # ab_code_list=[config_.AB_CODE['position_insert'], config_.AB_CODE['relevant_video_op']],
|
|
|
+ # app_type=app_type, mid=mid, uid=uid, head_vid=video_id, size=size)
|
|
|
# redis数据刷新
|
|
|
- update_redis_data(result=result, app_type=app_type, mid=mid, last_rov_recall_key=last_rov_recall_key,
|
|
|
+ update_redis_data(result=rank_result, app_type=app_type, mid=mid, last_rov_recall_key=last_rov_recall_key,
|
|
|
top_K=top_K)
|
|
|
|
|
|
- return result
|
|
|
+ return rank_result
|
|
|
|
|
|
|
|
|
if __name__ == '__main__':
|