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

Function run_checks

dali/test/python/test_external_source_impl_utils.py:33–47  ·  view source on GitHub ↗
(samples_allowed, batches_allowed, samples_disallowed, batches_disallowed)

Source from the content-addressed store, hash-verified

31
32
33def run_checks(samples_allowed, batches_allowed, samples_disallowed, batches_disallowed):
34 for sample, baseline in samples_allowed:
35 yield passes_assert, external_source_impl.assert_cpu_sample_data_type, sample
36 yield converts, external_source_impl.sample_to_numpy, sample, baseline
37 for sample, baseline in samples_allowed + batches_allowed:
38 yield passes_assert, external_source_impl.assert_cpu_batch_data_type, sample
39 yield converts, external_source_impl.batch_to_numpy, sample, baseline
40 for sample in samples_disallowed:
41 yield raises(TypeError, "Unsupported callback return type.")(
42 external_source_impl.assert_cpu_sample_data_type
43 ), sample
44 for sample in samples_disallowed + batches_disallowed:
45 yield raises(TypeError, "Unsupported callback return type")(
46 external_source_impl.assert_cpu_batch_data_type
47 ), sample
48
49
50def non_uniform_tl():

Callers 3

test_regular_containersFunction · 0.85
test_pytorch_containersFunction · 0.85
test_cupy_containersFunction · 0.85

Calls 1

raisesFunction · 0.90

Tested by

no test coverage detected