Commit 7eb0395f authored by 张彦钊's avatar 张彦钊

change test file

parent bb8b7fe0
...@@ -71,11 +71,11 @@ def feature_engineer(): ...@@ -71,11 +71,11 @@ def feature_engineer():
.map(lambda x: (app_list_func(x[0], app_list_map),[value_map[x[2]],value_map[x[1]]], float(x[3]),float(x[4]))) .map(lambda x: (app_list_func(x[0], app_list_map),[value_map[x[2]],value_map[x[1]]], float(x[3]),float(x[4])))
spark.createDataFrame(test).toDF("level2_ids","ids","y","z")\ spark.createDataFrame(test).toDF("level2_ids","ids","y","z")\
.coalesce(1).write.format("tfrecords").save(path=path+"va/", mode="overwrite") .repartition(1).write.format("tfrecords").save(path=path+"va/", mode="overwrite")
print("va write done") print("va write done")
spark.createDataFrame(train).toDF("level2_ids","ids","y","z") \ spark.createDataFrame(train).toDF("level2_ids","ids","y","z") \
.coalesce(1).write.format("tfrecords").save(path=path+"tr/", mode="overwrite") .repartition(1).write.format("tfrecords").save(path=path+"tr/", mode="overwrite")
print("done") print("done")
rdd.unpersist() rdd.unpersist()
......
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