MCPcopy Create free account
hub / github.com/alibaba/bigcomputing / __init__

Method __init__

DIEN/data_loader.py:12–29  ·  view source on GitHub ↗
(
        self,
        data_path,
        data_file,
        batch_size,
        data_file_num,
        sleep_time=1,
        max_queue_size = 2
    )

Source from the content-addressed store, hash-verified

10class DataLoader:
11
12 def __init__(
13 self,
14 data_path,
15 data_file,
16 batch_size,
17 data_file_num,
18 sleep_time=1,
19 max_queue_size = 2
20 ):
21 # load data
22 self.queue = deque() #multiprocessing.Queue(maxsize=max_queue_size) # it may change in future if we decide to split data into many small chunks instead of 4
23 self.batch_size = batch_size
24 self.data_path = data_path
25 self.data_file = data_file
26 self.data_file_num = data_file_num
27 self.sleep_time = sleep_time
28 self.max_queue_size = max_queue_size
29 self.help_count = 0
30
31 def __iter__(self):
32 return self

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected