MCPcopy Create free account
hub / github.com/OpenDriveLab/ReSim / test_metads_reading

Function test_metads_reading

SwissArmyTransformer/tests/test_read_img.py:41–52  ·  view source on GitHub ↗
(path)

Source from the content-addressed store, hash-verified

39 print("SimpleDS: Time to read 2048 images: ", time.time() - t)
40
41def test_metads_reading(path):
42 def process_fn(stream):
43 for x in stream:
44 tmp1 = Image.open(io.BytesIO(x['jpg'])).convert('RGB')
45 yield tmp1
46
47 d = MetaDistributedWebDataset(path, process_fn, 0)
48 it = iter(d)
49 t = time.time()
50 for i in range(2048):
51 tmp = next(it)
52 print("metaDS: Time to read 2048 images: ", time.time() - t)
53
54def test_metads_reading_tensor(path):
55 def process_fn(stream):

Callers

nothing calls this directly

Calls 2

printFunction · 0.50

Tested by

no test coverage detected