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

Function run_pipeline

dali/test/python/test_utils_tensorflow.py:259–270  ·  view source on GitHub ↗
(pipelines, iterations, device, to_stop_iter=False)

Source from the content-addressed store, hash-verified

257
258
259def run_pipeline(pipelines, iterations, device, to_stop_iter=False):
260 if not isinstance(pipelines, list):
261 pipelines = [pipelines]
262 results = []
263 with expect_iter_end(not to_stop_iter, StopIteration):
264 for _ in range(iterations):
265 shard_outputs = []
266 for pipeline in pipelines:
267 pipe_outputs = pipeline.run()
268 shard_outputs.append(tuple(to_array(result) for result in pipe_outputs))
269 results.append(tuple(shard_outputs))
270 return results
271
272
273def compare(dataset_results, standalone_results, iterations=-1, num_devices=1):

Calls 4

to_arrayFunction · 0.90
expect_iter_endFunction · 0.85
runMethod · 0.45
appendMethod · 0.45

Tested by

no test coverage detected