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

Function test_simpleds_reading

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

Source from the content-addressed store, hash-verified

26
27from sat.data_utils import SimpleDistributedWebDataset, MetaDistributedWebDataset
28def test_simpleds_reading(path):
29 def process_fn(stream):
30 for x in stream:
31 tmp1 = Image.open(io.BytesIO(x['jpg'])).convert('RGB')
32 yield tmp1
33
34 d = SimpleDistributedWebDataset(path, process_fn, 0)
35 it = iter(d)
36 t = time.time()
37 for i in range(2048):
38 tmp = next(it)
39 print("SimpleDS: Time to read 2048 images: ", time.time() - t)
40
41def test_metads_reading(path):
42 def process_fn(stream):

Callers

nothing calls this directly

Calls 2

printFunction · 0.50

Tested by

no test coverage detected