Commit 82e9d34d authored by 赵威's avatar 赵威

add share_num for diary

parent ce6ce8df
......@@ -72,6 +72,14 @@ _int_columns = [
"sixty_browse_user_num",
"ninety_browse_user_num",
"history_browse_user_num",
"one_share_num",
"three_share_num",
"seven_share_num",
"fifteen_share_num",
"thirty_share_num",
"sixty_share_num",
"ninety_share_num",
"history_share_num",
"first_demands_num",
"second_demands_num",
"first_solutions_num",
......
......@@ -94,6 +94,14 @@ DIARY_COLUMNS = [
"sixty_ctr",
"ninety_ctr",
"history_ctr",
"one_share_num",
"three_share_num",
"seven_share_num",
"fifteen_share_num",
"thirty_share_num",
"sixty_share_num",
"ninety_share_num",
"history_share_num",
"first_demands",
"second_demands",
"first_solutions",
......@@ -170,6 +178,14 @@ INT_COLUMNS = [
"sixty_browse_user_num",
"ninety_browse_user_num",
"history_browse_user_num",
"one_share_num",
"three_share_num",
"seven_share_num",
"fifteen_share_num",
"thirty_share_num",
"sixty_share_num",
"ninety_share_num",
"history_share_num",
"first_demands_num",
"second_demands_num",
"first_solutions_num",
......
......@@ -61,7 +61,8 @@ def main():
estimator_config = tf.estimator.RunConfig(session_config=session_config)
model = tf.estimator.Estimator(model_fn=esmm_model_fn, params=params, model_dir=model_path, config=estimator_config)
train_spec = tf.estimator.TrainSpec(input_fn=lambda: esmm_input_fn(train_df, shuffle=True), max_steps=50000)
# TODO 50000
train_spec = tf.estimator.TrainSpec(input_fn=lambda: esmm_input_fn(train_df, shuffle=True), max_steps=20000)
eval_spec = tf.estimator.EvalSpec(input_fn=lambda: esmm_input_fn(val_df, shuffle=False))
res = tf.estimator.train_and_evaluate(model, train_spec, eval_spec)
print("@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@")
......@@ -73,7 +74,8 @@ def main():
model_export_path = str(Path("/data/files/models/diary").expanduser())
save_path = model_export(model, all_features, model_export_path)
print("save to: " + save_path)
set_essm_model_save_path("diary", save_path)
# TODO save
# set_essm_model_save_path("diary", save_path)
print("============================================================")
# save_path = str(Path("~/Desktop/models/1596012827").expanduser()) # local
......
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