MCPcopy Create free account
hub / github.com/NVIDIA/DALI / check_iterator_build_error

Function check_iterator_build_error

dali/test/python/test_fw_iterators.py:1703–1722  ·  view source on GitHub ↗
(ErrorType, Iterator, glob, *args, **kwargs)

Source from the content-addressed store, hash-verified

1701
1702
1703def 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")

Calls 5

assert_raisesFunction · 0.90
IteratorClass · 0.85
create_pipelineFunction · 0.70
create_coco_pipelineFunction · 0.70
epoch_sizeMethod · 0.45

Tested by

no test coverage detected