(self)
| 176 | self.reader.release_memory() |
| 177 | |
| 178 | def init_reader(self): |
| 179 | if fleet.is_server(): |
| 180 | return |
| 181 | self.config["runner.reader_type"] = self.config.get( |
| 182 | "runner.reader_type", "QueueDataset") |
| 183 | self.reader, self.file_list = get_reader(self.input_data, config) |
| 184 | self.example_nums = 0 |
| 185 | self.count_method = self.config.get("runner.example_count_method", |
| 186 | "example") |
| 187 | if self.count_method == "example": |
| 188 | self.example_nums = get_example_num(self.file_list) |
| 189 | elif self.count_method == "word": |
| 190 | self.example_nums = get_word_num(self.file_list) |
| 191 | else: |
| 192 | raise ValueError( |
| 193 | "Set static_benchmark.example_count_method for example / word for example count." |
| 194 | ) |
| 195 | |
| 196 | def dataset_train_loop(self, epoch): |
| 197 | logger.info("Epoch: {}, Running Dataset Begin.".format(epoch)) |
no test coverage detected