MCPcopy Create free account
hub / github.com/DataArcTech/DataArc-SynData-Toolkit / execute

Method execute

sdgsystem/tasks/task_executor.py:54–75  ·  view source on GitHub ↗
(self, parallel_executor=None, reporter=None)

Source from the content-addressed store, hash-verified

52 return executor
53
54 def execute(self, parallel_executor=None, reporter=None) -> Dataset:
55 dataset = Dataset()
56
57 # Check which source is being used
58 if self.config.text is not None:
59 if self.config.text.web is not None:
60 # WebTaskExecutor doesn't use parallel_executor
61 dataset.extend(self.executor.execute(reporter=reporter))
62 else:
63 # LocalTaskExecutor and DistillTaskExecutor use parallel_executor
64 dataset.extend(self.executor.execute(parallel_executor=parallel_executor, reporter=reporter))
65 elif self.config.image is not None:
66 if self.config.image.web is not None:
67 # ImageWebTaskExecutor doesn't use parallel_executor
68 dataset.extend(self.executor.execute(reporter=reporter))
69 else:
70 # ImageLocalTaskExecutor uses parallel_executor
71 dataset.extend(self.executor.execute(parallel_executor=parallel_executor, reporter=reporter))
72 else:
73 dataset.extend(self.executor.execute(parallel_executor=parallel_executor, reporter=reporter))
74
75 return dataset

Callers

nothing calls this directly

Calls 2

extendMethod · 0.95
DatasetClass · 0.85

Tested by

no test coverage detected