Commit 2daf15e5 authored by 张彦钊's avatar 张彦钊

修改rerank文件每次写入的数量

parent 2372f9e4
...@@ -184,7 +184,7 @@ if __name__ == "__main__": ...@@ -184,7 +184,7 @@ if __name__ == "__main__":
print(len(users_list)) print(len(users_list))
name_tag = get_searchworlds_to_tagid() name_tag = get_searchworlds_to_tagid()
n = 1000 n = 500
split_users_list = [users_list[i:i + n] for i in range(0, len(users_list), n)] split_users_list = [users_list[i:i + n] for i in range(0, len(users_list), n)]
for child_users_list in split_users_list: for child_users_list in split_users_list:
total_samples = list() total_samples = list()
......
This diff is collapsed.
...@@ -202,16 +202,17 @@ def make_data(device_id,city_id,key_head): ...@@ -202,16 +202,17 @@ def make_data(device_id,city_id,key_head):
print(r.hgetall(key)) print(r.hgetall(key))
if __name__ == "__main__": if __name__ == "__main__":
native = ",".join([str(i) for i in (range(69, 72))]) native = ",".join([str(i) for i in (range(100, 102))])
nearby = ",".join([str(i) for i in (range(73, 76))]) nearby = ",".join([str(i) for i in (range(102, 106))])
nation = ",".join([str(i) for i in (range(77, 80))]) nation = ",".join([str(i) for i in (range(106, 110))])
megacity = ",".join([str(i) for i in (range(81, 83))]) megacity = ",".join([str(i) for i in (range(110, 118))])
key_head = "device_diary_queue_rerank:device_id:" key_head = "device_diary_queue_rerank:device_id:"
key_head = "device_diary_queue:device_id:" # key_head = "device_diary_queue:device_id:"
make_data("868663038800476", "beijing", key_head)
device_id = "868663038800476"
city_id = "beijing"
device_id = "868663038800471" device_id = "868663038800471"
make_data(device_id, "beijing", key_head)
# device_id = "868663038800476"
city_id = "beijing"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment