未验证 提交 bfd514c7 编写于 作者: J jiaqi 提交者: GitHub

fix default value of fleet desc (#19176)

* fix default value of fleet desc, default values are same with jingpai
* print log when save model
上级 492a00f5
...@@ -76,21 +76,21 @@ class DownpourServer(Server): ...@@ -76,21 +76,21 @@ class DownpourServer(Server):
table.compress_in_save = True table.compress_in_save = True
table.shard_num = 1000 table.shard_num = 1000
table.accessor.accessor_class = "DownpourCtrAccessor" table.accessor.accessor_class = "DownpourCtrAccessor"
table.accessor.sparse_sgd_param.learning_rate = learning_rate table.accessor.sparse_sgd_param.learning_rate = 0.05
table.accessor.sparse_sgd_param.initial_g2sum = 3 table.accessor.sparse_sgd_param.initial_g2sum = 3
table.accessor.sparse_sgd_param.initial_range = 1e-4 table.accessor.sparse_sgd_param.initial_range = 1e-4
table.accessor.sparse_sgd_param.weight_bounds.extend([-10, 10]) table.accessor.sparse_sgd_param.weight_bounds.extend([-10, 10])
table.accessor.embedx_dim = 8 table.accessor.embedx_dim = 8
table.accessor.embedx_threshold = 5 table.accessor.embedx_threshold = 10
table.accessor.fea_dim = 11 table.accessor.fea_dim = 11
table.accessor.downpour_accessor_param.nonclk_coeff = 0.1 table.accessor.downpour_accessor_param.nonclk_coeff = 0.1
table.accessor.downpour_accessor_param.click_coeff = 2 table.accessor.downpour_accessor_param.click_coeff = 1
table.accessor.downpour_accessor_param.base_threshold = 0.2 table.accessor.downpour_accessor_param.base_threshold = 1.5
table.accessor.downpour_accessor_param.delta_threshold = 0.15 table.accessor.downpour_accessor_param.delta_threshold = 0.25
table.accessor.downpour_accessor_param.delta_keep_days = 16 table.accessor.downpour_accessor_param.delta_keep_days = 30
table.accessor.downpour_accessor_param.delete_after_unseen_days = 30 table.accessor.downpour_accessor_param.delete_after_unseen_days = 30
table.accessor.downpour_accessor_param.show_click_decay_rate = 0.999 table.accessor.downpour_accessor_param.show_click_decay_rate = 0.98
table.accessor.downpour_accessor_param.delete_threshold = 0.8 table.accessor.downpour_accessor_param.delete_threshold = 0.8
def add_dense_table(self, table_id, learning_rate, param_var, grad_var): def add_dense_table(self, table_id, learning_rate, param_var, grad_var):
...@@ -158,11 +158,11 @@ class DownpourServer(Server): ...@@ -158,11 +158,11 @@ class DownpourServer(Server):
%(table_id, pslib.PS_DENSE_TABLE, table.type)) %(table_id, pslib.PS_DENSE_TABLE, table.type))
table = self._server.downpour_server_param.downpour_table_param.add() table = self._server.downpour_server_param.downpour_table_param.add()
table.table_id = table_id table.table_id = table_id
table.table_class = "DownpourDenseTable" table.table_class = "DownpourDenseDoubleTable"
table.type = pslib.PS_DENSE_TABLE table.type = pslib.PS_DENSE_TABLE
table.compress_in_save = True table.compress_in_save = True
table.accessor.accessor_class = "DownpourDenseValueAccessor" table.accessor.accessor_class = "DownpourDenseValueDoubleAccessor"
table.accessor.dense_sgd_param.name = "summary" table.accessor.dense_sgd_param.name = "summarydouble"
table.accessor.dense_sgd_param.summary.summary_decay_rate = 0.999999 table.accessor.dense_sgd_param.summary.summary_decay_rate = 0.999999
table.accessor.fea_dim = fea_dim table.accessor.fea_dim = fea_dim
......
...@@ -648,9 +648,9 @@ class FleetUtil(object): ...@@ -648,9 +648,9 @@ class FleetUtil(object):
pass_id = str(pass_id) pass_id = str(pass_id)
suffix_name = "/%s/%s/" % (day, pass_id) suffix_name = "/%s/%s/" % (day, pass_id)
model_path = output_path + suffix_name model_path = output_path + suffix_name
self.rank0_error("going to save_model %s" % model_path) self.rank0_print("going to save_model %s" % model_path)
self.save_fleet_model(model_path) self.save_fleet_model(model_path)
self.rank0_error("save_model done") self.rank0_print("save_model done")
def save_batch_model(self, output_path, day): def save_batch_model(self, output_path, day):
""" """
...@@ -671,9 +671,9 @@ class FleetUtil(object): ...@@ -671,9 +671,9 @@ class FleetUtil(object):
day = str(day) day = str(day)
suffix_name = "/%s/0/" % day suffix_name = "/%s/0/" % day
model_path = output_path + suffix_name model_path = output_path + suffix_name
self.rank0_error("going to save_model %s" % model_path) self.rank0_print("going to save_model %s" % model_path)
fleet.save_persistables(None, model_path, mode=3) fleet.save_persistables(None, model_path, mode=3)
self.rank0_error("save_batch_model done") self.rank0_print("save_batch_model done")
def save_delta_model(self, output_path, day, pass_id): def save_delta_model(self, output_path, day, pass_id):
""" """
...@@ -696,9 +696,9 @@ class FleetUtil(object): ...@@ -696,9 +696,9 @@ class FleetUtil(object):
pass_id = str(pass_id) pass_id = str(pass_id)
suffix_name = "/%s/delta-%s/" % (day, pass_id) suffix_name = "/%s/delta-%s/" % (day, pass_id)
model_path = output_path + suffix_name model_path = output_path + suffix_name
self.rank0_error("going to save_delta_model %s" % model_path) self.rank0_print("going to save_delta_model %s" % model_path)
fleet.save_persistables(None, model_path, mode=1) fleet.save_persistables(None, model_path, mode=1)
self.rank0_error("save_delta_model done") self.rank0_print("save_delta_model done")
def save_xbox_base_model(self, output_path, day): def save_xbox_base_model(self, output_path, day):
""" """
...@@ -720,9 +720,9 @@ class FleetUtil(object): ...@@ -720,9 +720,9 @@ class FleetUtil(object):
pass_id = str(pass_id) pass_id = str(pass_id)
suffix_name = "/%s/base/" % day suffix_name = "/%s/base/" % day
model_path = output_path + suffix_name model_path = output_path + suffix_name
self.rank0_error("going to save_xbox_base_model " + model_path) self.rank0_print("going to save_xbox_base_model " + model_path)
fleet.save_persistables(None, model_path, mode=2) fleet.save_persistables(None, model_path, mode=2)
self.rank0_error("save_xbox_base_model done") self.rank0_print("save_xbox_base_model done")
def save_cache_model(self, output_path, day, pass_id): def save_cache_model(self, output_path, day, pass_id):
""" """
...@@ -748,9 +748,9 @@ class FleetUtil(object): ...@@ -748,9 +748,9 @@ class FleetUtil(object):
pass_id = str(pass_id) pass_id = str(pass_id)
suffix_name = "/%s/delta-%s" % (day, pass_id) suffix_name = "/%s/delta-%s" % (day, pass_id)
model_path = output_path.rstrip("/") + suffix_name model_path = output_path.rstrip("/") + suffix_name
self.rank0_error("going to save_cache_model %s" % model_path) self.rank0_print("going to save_cache_model %s" % model_path)
key_num = fleet.save_cache_model(None, model_path, mode=0) key_num = fleet.save_cache_model(None, model_path, mode=1)
self.rank0_error("save_cache_model done") self.rank0_print("save_cache_model done")
return key_num return key_num
def save_cache_base_model(self, output_path, day): def save_cache_base_model(self, output_path, day):
...@@ -776,9 +776,9 @@ class FleetUtil(object): ...@@ -776,9 +776,9 @@ class FleetUtil(object):
day = str(day) day = str(day)
suffix_name = "/%s/base" % day suffix_name = "/%s/base" % day
model_path = output_path.rstrip("/") + suffix_name model_path = output_path.rstrip("/") + suffix_name
self.rank0_error("going to save_cache_model %s" % model_path) self.rank0_print("going to save_cache_base_model %s" % model_path)
key_num = fleet.save_cache_model(None, model_path, mode=0) key_num = fleet.save_cache_model(None, model_path, mode=2)
self.rank0_error("save_cache_model done") self.rank0_print("save_cache_base_model done")
return key_num return key_num
def pull_all_dense_params(self, scope, program): def pull_all_dense_params(self, scope, program):
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册