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

Function check_dim_mismatch

dali/test/python/reader/test_numpy.py:416–428  ·  view source on GitHub ↗
(device, test_data_root, names)

Source from the content-addressed store, hash-verified

414
415
416def check_dim_mismatch(device, test_data_root, names):
417 pipe = Pipeline(2, 2, 0)
418 pipe.set_outputs(fn.readers.numpy(device=device, file_root=test_data_root, files=names))
419 err = None
420 try:
421 pipe.run()
422 except RuntimeError as thrown:
423 err = thrown
424 finally:
425 del pipe
426 # asserts should not be in except block to avoid printing nested exception on failure
427 assert err, "Exception not thrown"
428 assert "Inconsistent data" in str(err), "Unexpected error message: {}".format(err)
429
430
431@params(*(["cpu", "gpu"] if is_gds_supported() else ["cpu"]))

Callers 1

test_dim_mismatchFunction · 0.85

Calls 3

set_outputsMethod · 0.95
runMethod · 0.95
PipelineClass · 0.90

Tested by

no test coverage detected