MCPcopy Create free account
hub / github.com/PaddlePaddle/Paddle / order_read_worker

Function order_read_worker

python/paddle/reader/decorator.py:505–510  ·  view source on GitHub ↗
(reader, in_queue)

Source from the content-addressed store, hash-verified

503
504 # define a worker to read samples from reader to in_queue with order flag
505 def order_read_worker(reader, in_queue):
506 in_order = 0
507 for i in reader():
508 in_queue.put((in_order, i))
509 in_order += 1
510 in_queue.put(end)
511
512 # define a worker to handle samples from in_queue by mapper
513 # and put mapped samples into out_queue

Callers

nothing calls this directly

Calls 2

readerFunction · 0.70
putMethod · 0.45

Tested by

no test coverage detected