Commit e0af2cda authored by 赵威's avatar 赵威

rerun

parent 03618ec9
...@@ -41,9 +41,9 @@ def offline_predict(device_id, device_dict, diary_dict, predict_fn): ...@@ -41,9 +41,9 @@ def offline_predict(device_id, device_dict, diary_dict, predict_fn):
diary_ids = user_portrait_tag3_get_candidate_unread_list(device_id, "diary") diary_ids = user_portrait_tag3_get_candidate_unread_list(device_id, "diary")
print("diary_ids: " + str(len(diary_ids))) print("diary_ids: " + str(len(diary_ids)))
diary_ids = random.sample(diary_ids, 500)
res = model_predict_diary(device_id, diary_ids, device_dict, diary_dict, predict_fn) res = model_predict_diary(device_id, diary_ids, device_dict, diary_dict, predict_fn)
print("res: " + str(len(res)) + " " + str(res[:5])) print("res: " + str(len(res)))
# print("res: " + str(len(res)) + " " + str(res[:5]))
user_portrait_tag3_write_ctcvr_data(device_id, "diary", res[:500]) user_portrait_tag3_write_ctcvr_data(device_id, "diary", res[:500])
total_time = (time.time() - time_begin) total_time = (time.time() - time_begin)
...@@ -60,14 +60,14 @@ def main(): ...@@ -60,14 +60,14 @@ def main():
save_path = "/home/gmuser/data/models/1595501144" save_path = "/home/gmuser/data/models/1595501144"
predict_fn = tf.contrib.predictor.from_saved_model(save_path) predict_fn = tf.contrib.predictor.from_saved_model(save_path)
device_id = "androidid_a25a1129c0b38f7b" # device_id = "androidid_a25a1129c0b38f7b"
offline_predict(device_id, device_dict, diary_dict, predict_fn) # offline_predict(device_id, device_dict, diary_dict, predict_fn)
# res = user_portrait_tag3_get_candidate_unread_list(device_id, "diary") # res = user_portrait_tag3_get_candidate_unread_list(device_id, "diary")
# print(len(res)) # print(len(res))
# print(res[:10]) # print(res[:10])
# user_portrait_scan_info(device_dict, diary_dict, predict_fn) user_portrait_scan_info(device_dict, diary_dict, predict_fn)
if __name__ == "__main__": if __name__ == "__main__":
......
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