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

Function test_external_source_with_iter

dali/test/python/test_external_source_impl.py:415–426  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

413
414
415def test_external_source_with_iter():
416 for attempt in range(10):
417 pipe = Pipeline(1, 3, 0)
418
419 pipe.set_outputs(
420 fn.external_source(
421 lambda i: [make_array([attempt * 100 + i * 10 + 1.5], dtype=datapy.float32)]
422 )
423 )
424
425 for i in range(10):
426 check_output(pipe.run(), [np.array([attempt * 100 + i * 10 + 1.5], dtype=np.float32)])
427
428
429def test_external_source_with_sample_info():

Callers

nothing calls this directly

Calls 4

set_outputsMethod · 0.95
runMethod · 0.95
PipelineClass · 0.90
check_outputFunction · 0.90

Tested by

no test coverage detected