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

Method init_reader

tools/static_gpubox_trainer.py:190–204  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

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

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