Commit 5991bc3b authored by 赵威's avatar 赵威

predict tractate

parent 32d47eb6
......@@ -32,8 +32,8 @@ def user_portrait_scan_info(device_dict, diary_dict, tractate_dict, diary_predic
if (user_portrait_tag3_get_candidate_dict(device_id, "diary")):
all_count += 1
print(str(all_count) + ": " + device_id)
offline_predict_diary(device_id, device_dict, diary_dict, diary_predict_fn)
# offline_predict_tractate(device_dict, device_dict, tractate_dict, tractate_predict_fn)
# offline_predict_diary(device_id, device_dict, diary_dict, diary_predict_fn)
offline_predict_tractate(device_dict, device_dict, tractate_dict, tractate_predict_fn)
print("all count: " + str(all_count))
print("scan done " + str(datetime.datetime.now()))
......@@ -52,7 +52,7 @@ def offline_predict_diary(device_id, device_dict, diary_dict, predict_fn):
user_portrait_tag3_write_ctcvr_data(device_id, "diary", res[:500])
total_time = (time.time() - time_begin)
print("total cost {:.5f}s\n".format(total_time))
print("total cost {:.5f}s".format(total_time))
def offline_predict_tractate(device_id, device_dict, tractate_dict, predict_fn):
......@@ -62,8 +62,8 @@ def offline_predict_tractate(device_id, device_dict, tractate_dict, predict_fn):
print("tractate_ids: " + str(len(tractate_ids)))
res = model_predict_tractate(device_id, tractate_ids, device_dict, tractate_dict, predict_fn)
print("res: " + str(len(res)))
# print(res[:10])
user_portrait_tag3_write_ctcvr_data(device_id, "tractate", res[:500])
print(res[:10])
# user_portrait_tag3_write_ctcvr_data(device_id, "tractate", res[:500])
total_time = (time.time() - time_begin)
print("total cost {:.5f}s\n".format(total_time))
......
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