(path)
| 39 | print("SimpleDS: Time to read 2048 images: ", time.time() - t) |
| 40 | |
| 41 | def 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 | |
| 54 | def test_metads_reading_tensor(path): |
| 55 | def process_fn(stream): |
nothing calls this directly
no test coverage detected