A workflow (also called as “pipeline”) consists of tasks and a task is realized by Operator.
MONAI Deploy App SDK has useful built-in operators you can reuse (the list of operators would keep growing with your contribution!).
If the built-in operators do not work for you, you can implement your operators. We will guide you throughout the sections in this document.
A workflow is a form of a graph which is usually a Directed Acyclic Graph (DAG).
The simplest form of the workflow would be a one-operator workflow.
Above graph shows an Operator (named
MyOperator) that load file from the
input_path in the local file system (
DISK type), process the file, and write the processed data into
output_path in the local file system (
In the workflow description,
DISK means a Storage Type.
If the input or the output data is supposed in memory, you can use
Let’s see another workflow example whose operators are connected linearly.
In this example, Task1 accepts its input (path) from the disk, and the processed data is set to
output1 of Task1 in memory.
The memory object (
output1) is passed to Task2 as an input (
output2 of Task2 is passed to Task3 as
input3 and the final result would be saved in a file in the folder where
output3 is referring.
Data Type and Domain Object¶
In addition to the Storage Type, each input or output of an operator has another property –
There are built-in data types that MONAI Deploy App SDK supports which are called
Those domain object classes are controllable by the SDK so can be optimized further in the future.
The full list of Domain Object classes are available here.
The functionality of mapping DataPath to the input and output of root and leaf operator(s) is absent starting with Release V0.6 of this App SDK, due to the move to rely on Holoscan SDK. It is planned to be re-introduced at a later time. For the time being, the application's input and output folders are passed to the root and leaf operators' constructor, as needed.
Among those classes, DataPath data type is special.
If an operator in the workflow graph is a root node (a node with no incoming edges) and its input’s
(<data type>, <storage type>) == (DataPath, DISK), the input path given by the user during the execution would be mapped into the input of the operator.
If an operator in the workflow graph is a leaf node (a node with no outgoing edges) and its output’s
(<data type>, <storage type>) == (DataPath, DISK), the output path given by the user during the execution would be mapped into the output of the operator.
A linear workflow example above, if the workflow is processing the image data, operators’ input/output specification would look like this:
The above workflow graph is the same as a Simple Image Processing App. Please look at the tutorial to see how such an application can be made with MONAI Deploy App SDK.
Multiple inputs and outputs¶
You can design a complex workflow like below that some operators have multi-inputs or multi-outputs.