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

Function test_external_source_generator

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

Source from the content-addressed store, hash-verified

448
449
450def test_external_source_generator():
451 pipe = Pipeline(1, 3, 0)
452
453 def gen():
454 for i in range(5):
455 yield [make_array([i + 1.5], dtype=datapy.float32)]
456
457 pipe.set_outputs(fn.external_source(gen()))
458
459 for i in range(5):
460 check_output(pipe.run(), [np.array([i + 1.5], dtype=np.float32)])
461
462
463def test_external_source_gen_function_cycle():

Callers

nothing calls this directly

Calls 5

set_outputsMethod · 0.95
runMethod · 0.95
PipelineClass · 0.90
check_outputFunction · 0.90
genFunction · 0.70

Tested by

no test coverage detected