(self)
| 85 | fleet.init() |
| 86 | |
| 87 | def network(self): |
| 88 | self.model = get_model(self.config) |
| 89 | self.input_data = self.model.create_feeds() |
| 90 | self.metrics = self.model.net(self.input_data) |
| 91 | logger.info("cpu_num: {}".format(os.getenv("CPU_NUM"))) |
| 92 | |
| 93 | thread_stat_var_names = [ |
| 94 | self.model.auc_stat_list[2].name, self.model.auc_stat_list[3].name |
| 95 | ] |
| 96 | thread_stat_var_names += [i.name for i in self.model.metric_list] |
| 97 | thread_stat_var_names = list(set(thread_stat_var_names)) |
| 98 | self.config['stat_var_names'] = thread_stat_var_names |
| 99 | |
| 100 | self.metric_list = list(self.model.auc_stat_list) + list( |
| 101 | self.model.metric_list) |
| 102 | self.metric_types = ["int64"] * len(self.model.auc_stat_list) + [ |
| 103 | "float32" |
| 104 | ] * len(self.model.metric_list) |
| 105 | self.model.create_optimizer(get_strategy(self.config)) |
| 106 | |
| 107 | def run_server(self): |
| 108 | logger.info("Run Server Begin") |
no test coverage detected