Commit 96a6a23e authored by 张彦钊's avatar 张彦钊

change test fliw

parent c8e1fa12
......@@ -32,11 +32,6 @@ def multi_hot(df,column,n):
def feature_engineer():
# TODO 删除下面的测试写入
df = spark.sql("select y,z from esmm_train_data limit 6000")
df.write.format("parquet").save(path=path+"tr", mode="overwrite")
print("done")
db = pymysql.connect(host='172.16.40.158', port=4000, user='root', passwd='3SYz54LS9#^9sBvC', db='jerry_test')
sql = "select max(stat_date) from esmm_train_data"
validate_date = con_sql(db, sql)[0].values.tolist()[0]
......@@ -238,8 +233,15 @@ if __name__ == '__main__':
ti.tidbMapDatabase("jerry_test")
spark.sparkContext.setLogLevel("WARN")
path = "/strategy/esmm/"
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)
# TODO 删除下面的测试写入
df = spark.sql("select y,z from esmm_train_data limit 6000")
df.write.format("tfrecords").option("recordType", "Example").save(path=path + "tr")
print("done")
# 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)
......
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