Commit 791039a8 authored by 张彦钊's avatar 张彦钊

modify delete.py file

No related merge requests found
......@@ -17,7 +17,14 @@ def remove_files(fileDir):
os.remove(fileDir + "/" + eachFile)
def remove_tmp():
for eachFile in os.listdir("/tmp"):
if "xlearn" in eachFile:
os.remove("/tmp" + "/" + eachFile)
if __name__ == "__main__":
while True:
remove_tmp()
remove_files(DIRECTORY_PATH + "result")
time.sleep(5*60)
......@@ -47,8 +47,8 @@ def predict(user_profile):
ffm_model = xl.create_ffm()
ffm_model.setTest(instance_file_path)
ffm_model.setSigmoid()
param = {"log": "/data2/models/result"}
ffm_model.predict(param,DIRECTORY_PATH + "model.out",
ffm_model.predict(DIRECTORY_PATH + "model.out",
DIRECTORY_PATH + "result/{0}_output.txt".format(user_profile['device_id']))
print("该用户预测结束")
predict_save_to_local(user_profile, instance)
......
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