|
@@ -945,14 +945,14 @@ def video_sank_pos_rank(data, size, top_K, flow_pool_P, ab_Code='', exp_config=N
|
|
|
else:
|
|
|
recall_dict['return_video_recall'] = return_video_recall
|
|
|
|
|
|
- recall_pos1 = [('rov_recall_region_h',0.98),('rov_recall_24h',0.02),('rov_recall_region_24h',1),
|
|
|
- ('rov_recall_24h',1),('rov_recall_24h_dup',1)]
|
|
|
- recall_pos2 = [('rov_recall_region_h',0.98),('rov_recall_24h',0.02),('rov_recall_region_24h',1),
|
|
|
- ('rov_recall_24h',1),('rov_recall_24h_dup',1)]
|
|
|
- recall_pos3 = [('rov_recall_region_h', 0.98), ('rov_recall_24h', 0.02), ('rov_recall_region_24h', 1),
|
|
|
- ('rov_recall_24h', 1), ('rov_recall_24h_dup', 1)]
|
|
|
- recall_pos4 = [('rov_recall_region_h', 0.98), ('rov_recall_24h', 0.02), ('rov_recall_region_24h', 1),
|
|
|
- ('rov_recall_24h', 1), ('rov_recall_24h_dup', 1)]
|
|
|
+ recall_pos1 = [('rov_recall_region_h',0, 0.98),('rov_recall_24h',0.98, 1),('rov_recall_region_24h',0,1),
|
|
|
+ ('rov_recall_24h',0,1), ('rov_recall_24h_dup',0,1)]
|
|
|
+ recall_pos2 = [('rov_recall_region_h',0,0.98),('rov_recall_24h',0.98,1),('rov_recall_region_24h',0,1),
|
|
|
+ ('rov_recall_24h',0,1),('rov_recall_24h_dup',0,1)]
|
|
|
+ recall_pos3 = [('rov_recall_region_h', 0,0.98), ('rov_recall_24h', 0.98,1), ('rov_recall_region_24h', 0,1),
|
|
|
+ ('rov_recall_24h', 0,1), ('rov_recall_24h_dup', 0,1)]
|
|
|
+ recall_pos4 = [('rov_recall_region_h', 0,0.98), ('rov_recall_24h', 0,0.02), ('rov_recall_region_24h', 0,1),
|
|
|
+ ('rov_recall_24h', 0,1), ('rov_recall_24h_dup', 0,1)]
|
|
|
if exp_config and 'recall_pos1' in exp_config \
|
|
|
and 'recall_pos2' in exp_config \
|
|
|
and 'recall_pos3' in exp_config \
|
|
@@ -985,14 +985,17 @@ def video_sank_pos_rank(data, size, top_K, flow_pool_P, ab_Code='', exp_config=N
|
|
|
for per_recall_item in recall_pos_config:
|
|
|
if index_pos == 1:
|
|
|
break
|
|
|
+ if len(per_recall_item)<3:
|
|
|
+ continue
|
|
|
per_recall_name = per_recall_item[0]
|
|
|
- per_recall_freq = per_recall_item[1]
|
|
|
+ per_recall_min = float(per_recall_item[1])
|
|
|
+ per_recall_max = float(per_recall_item[2])
|
|
|
per_recall_num = exp_recall_dict.get(per_recall_name, 0)
|
|
|
per_recall_total_num = recall_num_limit_dict.get(per_recall_name, 0)
|
|
|
# recall set total num
|
|
|
if len(recall_num_limit_dict)>0 and per_recall_total_num>0 and per_recall_num>= per_recall_total_num:
|
|
|
continue
|
|
|
- if rand_num < per_recall_freq and per_recall_name in recall_dict:
|
|
|
+ if rand_num >= per_recall_min and rand_num < per_recall_max and per_recall_name in recall_dict:
|
|
|
per_recall = recall_dict[per_recall_name]
|
|
|
for recall_item in per_recall:
|
|
|
vid = recall_item['videoId']
|