Commit 38322d71 authored by 高雅喆's avatar 高雅喆

Merge branch 'master' of git.wanmeizhensuo.com:ML/ffm-baseline

pip install supervisor at nvwa py3 and add .idea at .gitignore
parents 7499c7c7 4adad597
......@@ -56,7 +56,8 @@ def predict(user_profile):
DIRECTORY_PATH + "result/{0}_output.txt".format(user_profile['device_id']))
print("预测结束")
predict_save_to_local(user_profile, instance)
predict_save_to_redis(user_profile, instance)
#TODO 没有提供生产环境的redis地址,所以这个函数先不运行
# predict_save_to_redis(user_profile, instance)
# 将预测结果与device_id 进行拼接,并按照概率降序排序
def wrapper_result(user_profile, instance):
......
......@@ -16,6 +16,7 @@ def con_sql(sql):
return df
# 把数据写到redis里
# TODO 生产环境的redis地址没有提供,下面的地址是测试环境的,需要改成生产环境地址
def add_data_to_redis(key,val):
r = redis.StrictRedis(host='10.30.50.58', port=6379, db = 12)
r.set(key, val)
......
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