MCPcopy
hub / github.com/deepspeedai/DeepSpeed / RandomDataset

Class RandomDataset

tests/torch_compile/test_compile.py:21–31  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

19
20
21class RandomDataset(Dataset):
22
23 def __init__(self, size, length):
24 self.len = length
25 self.data = torch.randn(length, size).to(torch.bfloat16)
26
27 def __getitem__(self, index):
28 return self.data[index]
29
30 def __len__(self):
31 return self.len
32
33
34data_size = 1024

Callers 1

test_compile.pyFile · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…