(self)
| 188 | self.PSGPU.finalize() |
| 189 | |
| 190 | def init_reader(self): |
| 191 | if fleet.is_server(): |
| 192 | return |
| 193 | self.reader, self.file_list = get_reader(self.input_data, config) |
| 194 | self.example_nums = 0 |
| 195 | self.count_method = self.config.get("runner.example_count_method", |
| 196 | "example") |
| 197 | if self.count_method == "example": |
| 198 | self.example_nums = get_example_num(self.file_list) |
| 199 | elif self.count_method == "word": |
| 200 | self.example_nums = get_word_num(self.file_list) |
| 201 | else: |
| 202 | raise ValueError( |
| 203 | "Set static_benchmark.example_count_method for example / word for example count." |
| 204 | ) |
| 205 | |
| 206 | def dataset_train_loop(self, epoch): |
| 207 | start_time = time.time() |
no test coverage detected