You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This document introduces the basic concepts of the MONAI Deploy App SDK. If you are eager to try out the SDK in practice, you can start with the tutorial. After the tutorial, you can return to this document to learn more about how MONAI Deploy App SDK works.
3
+
This document introduces the basic concepts of the MONAI Deploy App SDK. If you are eager to try out the SDK in practice, you can start with the [tutorial](/getting_started/tutorials/index). After the tutorial, you can return to this document to learn more about how MONAI Deploy App SDK works.
4
+
5
+
As described in the [Architecture of MONAI Deploy App SDK](/introduction/architecture), an application is implemented by subclassing [Application](/modules/_autosummary/monai.deploy.core.Application) class.
[Application](/modules/_autosummary/monai.deploy.core.Application) represents a workflow as a [Graph](/modules/_autosummary/monai.deploy.core.graphs.Graph) and the graph handles [Operator](/modules/_autosummary/monai.deploy.core.Operator)s which are computational tasks.
33
+
34
+
To develop and deploy your MONAI App, you can follow the steps below (click a node to see the detail):
click Design "./designing_workflow.html" "Go to the document" _self
54
+
click Operator "./creating_operator_classes.html" "Go to the document" _self
55
+
click App "./creating_application_class.html" "Go to the document" _self
56
+
click ExecApp "./executing_app_locally.html" "Go to the document" _self
57
+
```
58
+
59
+
First, you will need to design the workflow of your application that defines [Operator](/modules/_autosummary/monai.deploy.core.Operator)s (tasks) and flows among them. Once the workflow is designed, you can start implementing operator classes for those that you cannot use existing operators as they are. Then implement an [Application](/modules/_autosummary/monai.deploy.core.Application) class to make a workflow graph with the operators.
60
+
61
+
You can execute and debug your application locally in a Jupyter notebook or through CLI.
62
+
63
+
## 2. Packaging, Local-Running, and Deploying Application Package
64
+
65
+
```{mermaid}
66
+
:alt: Application class diagram
67
+
:align: center
68
+
:caption: ⠀⠀Steps to package, local-running, and deploying MONAI Application Package (MAP)
In the following sections, the components of the architecture are described in more detail. To highlight the time-dimension of the architecture, the descriptions have been grouped by Development-time & Run-time.
22
22
@@ -26,18 +26,18 @@ The core development-time concept in the MONAI Deploy App SDK is an inference ap
26
26
27
27
The user is encouraged to structure the application code in a way that enables reproducibility and debuggability. In contrast, the SDK itself is designed to minimize concerns related to production readiness during development time. Optimally, the user can write idiomatic Python code focusing on the logic itself and the guard rails of the framework enable the code to be production-ready.
28
28
29
-
**Application**: An application represents a collection of computational tasks that together accomplish a meaningful goal in the healthcare domain. Typically, an app defines a workflow that reads medical imaging data from disk, processes it in one or more operators (some of which could be AI inference related), and produces output data. User implements an app by subclassing [monai.deploy.core.Application](/modules/_autosummary/monai.deploy.core.Application) class. An app makes use of instances of Operators as stages in the application.
29
+
**Application**: An application represents a collection of computational tasks that together accomplish a meaningful goal in the healthcare domain. Typically, an app defines a workflow that reads medical imaging data from disk, processes it in one or more operators (some of which could be AI inference related), and produces output data. User implements an app by subclassing [Application](/modules/_autosummary/monai.deploy.core.Application) class. An app makes use of instances of Operators as stages in the application.
30
30
31
-
**Graph**: The SDK provides a mechanism to define a directed acyclic graph which can be composed of operators. This acyclic property is important, as it prevents the framework from running into circular dependencies between operators. The graph consists of one or more vertices and edges, with each edge directed from one vertex to another, such that there is no way to start at any vertex and follow a consistently directed sequence of edges that eventually loops back to the same vertex again. Each vertex in the graph represents an Operator. The edge between two operators contains connectivity information.
31
+
**Graph**: The SDK provides a mechanism to define a directed acyclic graph (through [Graph](/modules/_autosummary/monai.deploy.core.graphs.Graph) class) which can be composed of operators. This acyclic property is important, as it prevents the framework from running into circular dependencies between operators. The graph consists of one or more vertices and edges, with each edge directed from one vertex to another, such that there is no way to start at any vertex and follow a consistently directed sequence of edges that eventually loops back to the same vertex again. Each vertex in the graph represents an Operator. The edge between two operators contains connectivity information.
32
32
33
-
**Operator**: An operator is the smallest unit of computation. It is implemented by the user by inheriting a class from the [monai.deploy.core.Operator](/modules/_autosummary/monai.deploy.core.Operator). An operator is an element of a MONAI Deploy Application. Each operator is typically designed to perform a specific function/analysis on incoming input data. Common examples of such functions are: reading images from disk, performing image processing, performing AI inference, writing images to disk, etc. The SDK comes with a bundled set of operators.
33
+
**Operator**: An operator is the smallest unit of computation. It is implemented by the user by inheriting a class from the [Operator](/modules/_autosummary/monai.deploy.core.Operator). An operator is an element of a MONAI Deploy Application. Each operator is typically designed to perform a specific function/analysis on incoming input data. Common examples of such functions are: reading images from disk, performing image processing, performing AI inference, writing images to disk, etc. The SDK comes with a bundled set of operators.
34
34
35
35
### Run-Time Concepts
36
36
37
37
The core runtime concepts in the MONAI Deploy App SDK are the MONAI Application Package (MAP) and a MONAI Application Runner (MAR). A key design decision of the SDK is to make the framework runtime-agnostic. The same code should be runnable in various environments, such as on a workstation during development or on a production-ready workflow orchestrator during production.
38
38
39
-
**MONAI Application Packager**: Once an application is built using the MONAI App SDK, it can be packaged into a portable MONAI Application Package (MAP). A MAP contains an executable application & provides sufficient information to execute the application as intended. It consists of a single container and metadata that provides additional information about the application. A MAP is self-describing and provides a mechanism for extracting its description. It provides information about its expected inputs such that an external agent is able to determine if the MAP is capable of receiving a workload. The containerized portion of a MAP complies with Open Container Initiative (OCI) format standards. The MONAI Application Packager utility helps developers to package an app written using the SDK into a MAP.
39
+
**MONAI Application Packager**: Once an application is built using the MONAI App SDK, it can be packaged into a portable MONAI Application Package (MAP). A MAP contains an executable application & provides sufficient information to execute the application as intended. It consists of a single container and metadata that provides additional information about the application. A MAP is self-describing and provides a mechanism for extracting its description. It provides information about its expected inputs such that an external agent is able to determine if the MAP is capable of receiving a workload. The containerized portion of a MAP complies with Open Container Initiative (OCI) format standards. The [MONAI Application Packager](/developing_with_sdk/packaging_app) utility helps developers to package an app written using the SDK into a MAP.
40
40
41
41
**Executor**: An executor in the SDK is an entity that ingests an Application, parses the Directed Acyclic Graph inside it, and executes the operators in the specified order. The SDK has provisions to support multiple types of Executors depending on single/multi-process and execution order needs.
42
42
43
-
**MONAI Application Runner**: The MONAI Application Runner (MAR) is a command-line utility that allows users to run and test their MONAI Application Package (MAP) locally. MAR is developed to make the running and testing of MAPs locally an easy process for developers by abstracting away the need to understand the internal details of the MAP. MAR allows users to specify input and output paths on the local file system which it maps to the input and output of MAP during execution.
43
+
**MONAI Application Runner**: The [MONAI Application Runner (MAR)](/developing_with_sdk/executing_packaged_app_locally) is a command-line utility that allows users to run and test their MONAI Application Package (MAP) locally. MAR is developed to make the running and testing of MAPs locally an easy process for developers by abstracting away the need to understand the internal details of the MAP. MAR allows users to specify input and output paths on the local file system which it maps to the input and output of MAP during execution.
0 commit comments