|
@@ -411,7 +411,7 @@ def video_recommend(request_id, mid, uid, size, top_K, flow_pool_P, app_type, al
|
|
|
def video_old_recommend(request_id, mid, uid, size, top_K, flow_pool_P, app_type, algo_type, client_info,
|
|
|
expire_time=24*3600, ab_code=config_.AB_CODE['initial'], rule_key='', data_key='',
|
|
|
no_op_flag=False, old_video_index=-1, video_id=None, params=None, rule_key_30day=None,
|
|
|
- shield_config=None):
|
|
|
+ shield_config=None, env_dict = None):
|
|
|
"""
|
|
|
首页线上推荐逻辑
|
|
|
:param request_id: request_id
|
|
@@ -653,7 +653,7 @@ def video_old_recommend(request_id, mid, uid, size, top_K, flow_pool_P, app_type
|
|
|
}
|
|
|
#if ab_code=="ab_new_test":
|
|
|
#print("before data:", data)
|
|
|
- rank_result, flow_num = video_new_rank2(data=data, size=size, top_K=top_K, flow_pool_P=float(flow_pool_P), ab_code=ab_code, exp_config=exp_config)
|
|
|
+ rank_result, flow_num = video_new_rank2(data=data, size=size, top_K=top_K, flow_pool_P=float(flow_pool_P), ab_code=ab_code, mid=mid, exp_config=exp_config, env_dict=env_dict)
|
|
|
#print(rank_result)
|
|
|
if rank_result:
|
|
|
result['rank_num'] = len(rank_result)
|
|
@@ -1743,7 +1743,7 @@ def video_homepage_recommend(request_id, mid, uid, size, app_type, algo_type,
|
|
|
|
|
|
|
|
|
def video_relevant_recommend(request_id, video_id, mid, uid, size, app_type, ab_exp_info, client_info,
|
|
|
- page_type, params, ab_info_data, version_audit_status):
|
|
|
+ page_type, params, ab_info_data, version_audit_status, env_dict):
|
|
|
"""
|
|
|
相关推荐逻辑
|
|
|
:param request_id: request_id
|
|
@@ -1807,7 +1807,7 @@ def video_relevant_recommend(request_id, video_id, mid, uid, size, app_type, ab_
|
|
|
ab_code=ab_code, expire_time=expire_time,
|
|
|
rule_key=rule_key, data_key=data_key, no_op_flag=no_op_flag,
|
|
|
old_video_index=old_video_index, video_id=video_id,
|
|
|
- params=params, rule_key_30day=rule_key_30day, shield_config=shield_config)
|
|
|
+ params=params, rule_key_30day=rule_key_30day, shield_config=shield_config, env_dict = env_dict)
|
|
|
else:
|
|
|
result = video_recommend(request_id=request_id,
|
|
|
mid=mid, uid=uid, app_type=app_type,
|