Commit a297c1a1 authored by 张彦钊's avatar 张彦钊

change test fil

parent 397c99b0
...@@ -220,7 +220,7 @@ def feature_engineer(): ...@@ -220,7 +220,7 @@ def feature_engineer():
# TODO 上线后把下面train fliter 删除,因为最近一天的数据也要作为训练集 # TODO 上线后把下面train fliter 删除,因为最近一天的数据也要作为训练集
train = rdd.filter(lambda x: x[0] != validate_date).map( train = rdd.map(
lambda x: (x[1], x[2], x[3], x[4], x[5], x[6], x[7], x[8], x[9], lambda x: (x[1], x[2], x[3], x[4], x[5], x[6], x[7], x[8], x[9],
x[10], x[11])) x[10], x[11]))
f = time.time() f = time.time()
...@@ -338,6 +338,7 @@ def get_predict(date,value_map,app_list_map,leve2_map,leve3_map): ...@@ -338,6 +338,7 @@ def get_predict(date,value_map,app_list_map,leve2_map,leve3_map):
print("nearby tfrecord done") print("nearby tfrecord done")
else: else:
print("预测集nearby为空") print("预测集nearby为空")
rdd.unpersist()
if __name__ == '__main__': if __name__ == '__main__':
...@@ -358,6 +359,6 @@ if __name__ == '__main__': ...@@ -358,6 +359,6 @@ if __name__ == '__main__':
local_path = "/home/gmuser/esmm/" local_path = "/home/gmuser/esmm/"
validate_date, value_map, app_list_map, leve2_map, leve3_map = feature_engineer() validate_date, value_map, app_list_map, leve2_map, leve3_map = feature_engineer()
get_predict(validate_date, value_map, app_list_map, leve2_map, leve3_map) # get_predict(validate_date, value_map, app_list_map, leve2_map, leve3_map)
spark.stop() spark.stop()
This diff is collapsed.
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