(ErrorType, Iterator, glob, *args, **kwargs)
| 1701 | |
| 1702 | |
| 1703 | def check_iterator_build_error(ErrorType, Iterator, glob, *args, **kwargs): |
| 1704 | batch_size = 4 |
| 1705 | num_gpus = 1 |
| 1706 | pipes, _ = create_pipeline( |
| 1707 | lambda gpu: create_coco_pipeline( |
| 1708 | batch_size=batch_size, |
| 1709 | num_threads=4, |
| 1710 | shard_id=gpu, |
| 1711 | num_gpus=num_gpus, |
| 1712 | data_paths=data_sets[0], |
| 1713 | random_shuffle=True, |
| 1714 | stick_to_shard=False, |
| 1715 | shuffle_after_epoch=False, |
| 1716 | pad_last_batch=False, |
| 1717 | ), |
| 1718 | batch_size, |
| 1719 | num_gpus, |
| 1720 | ) |
| 1721 | with assert_raises(ErrorType, glob=glob): |
| 1722 | Iterator(pipes, size=pipes[0].epoch_size("Reader"), *args, **kwargs) |
| 1723 | |
| 1724 | |
| 1725 | @attr("pytorch") |
no test coverage detected