(
file_root,
batch_size,
ndim,
dtype,
device,
fortran_order=False,
file_filter="*.npy",
roi_start=None,
rel_roi_start=None,
roi_end=None,
rel_roi_end=None,
roi_shape=None,
rel_roi_shape=None,
roi_axes=None,
out_of_bounds_policy=None,
fill_value=None,
)
| 863 | |
| 864 | |
| 865 | def _testimpl_numpy_reader_roi_error( |
| 866 | file_root, |
| 867 | batch_size, |
| 868 | ndim, |
| 869 | dtype, |
| 870 | device, |
| 871 | fortran_order=False, |
| 872 | file_filter="*.npy", |
| 873 | roi_start=None, |
| 874 | rel_roi_start=None, |
| 875 | roi_end=None, |
| 876 | rel_roi_end=None, |
| 877 | roi_shape=None, |
| 878 | rel_roi_shape=None, |
| 879 | roi_axes=None, |
| 880 | out_of_bounds_policy=None, |
| 881 | fill_value=None, |
| 882 | ): |
| 883 | @pipeline_def(batch_size=batch_size, device_id=0, num_threads=8) |
| 884 | def pipe(): |
| 885 | data = fn.readers.numpy( |
| 886 | device=device, |
| 887 | file_root=file_root, |
| 888 | file_filter=file_filter, |
| 889 | roi_start=roi_start, |
| 890 | rel_roi_start=rel_roi_start, |
| 891 | roi_end=roi_end, |
| 892 | rel_roi_end=rel_roi_end, |
| 893 | roi_shape=roi_shape, |
| 894 | rel_roi_shape=rel_roi_shape, |
| 895 | roi_axes=roi_axes, |
| 896 | out_of_bounds_policy=out_of_bounds_policy, |
| 897 | fill_value=fill_value, |
| 898 | shard_id=0, |
| 899 | num_shards=1, |
| 900 | cache_header_information=False, |
| 901 | ) |
| 902 | return data |
| 903 | |
| 904 | p = pipe() |
| 905 | err = None |
| 906 | try: |
| 907 | p.run() |
| 908 | except RuntimeError as thrown: |
| 909 | err = thrown |
| 910 | # asserts should not be in except block to avoid printing nested exception on failure |
| 911 | assert err, "Exception not thrown" |
| 912 | |
| 913 | |
| 914 | def _get_roi_error_params(): |
no test coverage detected