Commit bb44e89c authored by 郭羽's avatar 郭羽

美购精排模型耗时优化

parent 11f7278d
......@@ -686,7 +686,7 @@ if __name__ == '__main__':
# user特征数据存入redis
# featuresToRedis(samplesWithUserFeatures, user_columns, "user", FEATURE_USER_KEY)
userDatas = collectFeaturesToDict(samplesWithUserFeatures, user_columns, "user")
print("user feature to collect 耗时ms:{}".format(int(round(time.time()))-timestmp4))
print("user feature to collect 耗时s:{}".format(int(round(time.time()))-timestmp4))
timestmp4 = int(round(time.time()))
featureToRedis(FEATURE_USER_KEY, userDatas)
timestmp5 = int(round(time.time()))
......@@ -695,7 +695,7 @@ if __name__ == '__main__':
# item特征数据存入redis
# featuresToRedis(samplesWithUserFeatures, item_columns, "item", FEATURE_ITEM_KEY)
itemDatas = collectFeaturesToDict(samplesWithUserFeatures, item_columns, "item")
print("item feature to collect 耗时ms:{}".format(int(round(time.time())) - timestmp5))
print("item feature to collect 耗时s:{}".format(int(round(time.time())) - timestmp5))
timestmp5 = int(round(time.time()))
featureToRedis(FEATURE_ITEM_KEY, itemDatas)
timestmp6 = int(round(time.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