MCPcopy Index your code
hub / github.com/PaddlePaddle/PaddleRec / init_reader

Method init_reader

tools/static_ps_trainer.py:178–194  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

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))

Callers 1

networkMethod · 0.95

Calls 3

get_readerFunction · 0.90
get_example_numFunction · 0.90
get_word_numFunction · 0.90

Tested by

no test coverage detected