MCPcopy Create free account
hub / github.com/MegEngine/MegEngine / __iter__

Method __iter__

imperative/python/test/unit/data/test_dataloader.py:96–103  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

94 self.block = block
95
96 def __iter__(self):
97 for cnt in range(self.number):
98 if self.block:
99 for _ in range(10):
100 time.sleep(1)
101 data = np.random.randint(0, 256, (2, 2, 3), dtype="uint8")
102 yield (data, cnt)
103 raise StopIteration
104
105
106@pytest.mark.skipif(

Callers

nothing calls this directly

Calls 1

sleepMethod · 0.80

Tested by

no test coverage detected