MCPcopy
hub / github.com/microsoft/qlib / DummyDataset

Class DummyDataset

tests/rl/test_data_queue.py:14–23  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

12
13
14class DummyDataset(Dataset):
15 def __init__(self, length):
16 self.length = length
17
18 def __getitem__(self, index):
19 assert 0 <= index < self.length
20 return pd.DataFrame(np.random.randint(0, 100, size=(index + 1, 4)), columns=list("ABCD"))
21
22 def __len__(self):
23 return self.length
24
25
26def _worker(dataloader, collector):

Callers 4

test_pytorch_dataloaderFunction · 0.70
_exit_finiteFunction · 0.70
_exit_infiniteFunction · 0.70

Calls

no outgoing calls

Tested by 4

test_pytorch_dataloaderFunction · 0.56
_exit_finiteFunction · 0.56
_exit_infiniteFunction · 0.56