Commit 50f01f00 authored by 张彦钊's avatar 张彦钊

add print

parent dfdcb07f
......@@ -112,7 +112,7 @@ def predict(queue_name, x_list):
ffm_model.predict(DIRECTORY_PATH + "model.out",
DIRECTORY_PATH + "result/output{0}_{1}.csv".format(device_id,queue_name))
print("done predict")
save_result(queue_name, x_list)
......@@ -121,7 +121,8 @@ def save_result(queue_name, x_list):
score_df = score_df.rename(columns={0: "score"})
score_df["cid"] = x_list
print("done save_reult")
merge_score(x_list, score_df)
return score_df
def merge_score(x_list, score_df):
......@@ -154,8 +155,8 @@ def merge_score(x_list, score_df):
db.close()
score_df["score"] = score_df["score"] + score_list
return score_df
update_dairy_queue(score_df)
def update_dairy_queue(score_df):
......@@ -202,7 +203,10 @@ def update_sql_dairy_queue(queue_name, diary_id):
def multi_update(key, name_dict):
diary_id = predict(key, name_dict[key])
predict(key, name_dict[key])
score_df = save_result(key, name_dict[key])
score_df = merge_score(name_dict[key], score_df)
diary_id = update_dairy_queue(score_df)
if get_native_queue(device_id) == native_queue_list:
update_sql_dairy_queue(key, diary_id)
......
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