Skip to content

Commit 12c65e5

Browse files
committed
Update documents and check configuration
Signed-off-by: Gigon Bae <gbae@nvidia.com>
1 parent f59ff94 commit 12c65e5

File tree

18 files changed

+199
-19
lines changed

18 files changed

+199
-19
lines changed

docs/_static/custom.css

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,3 +105,10 @@ blockquote {
105105
blockquote p {
106106
margin-bottom: 0px;
107107
}
108+
109+
/* Mermaid
110+
to avoid the lable text being cut off
111+
*/
112+
.edgeTerminals {
113+
font-size: 9px !important;
114+
}
Lines changed: 80 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,82 @@
11
# Core concepts
22

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. 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.
6+
7+
```{mermaid}
8+
:alt: Application class diagram
9+
:align: center
10+
11+
%%{init: {"theme": "base", "themeVariables": { "fontSize": "12px"}} }%%
12+
13+
classDiagram
14+
direction TB
15+
class Application {
16+
}
17+
18+
class Graph {
19+
}
20+
21+
class Operator {
22+
}
23+
24+
<<abstract>> Application
25+
<<abstract>> Graph
26+
<<abstract>> Operator
27+
28+
Application --> Graph : makes use of
29+
Graph "1" --> "many" Operator : contains
30+
```
31+
32+
[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):
35+
36+
## 1. Developing Application
37+
38+
```{mermaid}
39+
:alt: Developing Application
40+
:align: center
41+
:caption: ⠀⠀Steps to developing application
42+
43+
%%{init: {"theme": "base", "themeVariables": { "fontSize": "12px"}} }%%
44+
45+
graph TD
46+
47+
Design(Design Workflow)
48+
--> Operator(Creating Operator classes)
49+
--> App(Creating Application class)
50+
--> ExecApp(Executing app locally)
51+
52+
53+
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)
69+
70+
%%{init: {"theme": "base", "themeVariables": { "fontSize": "12px"}} }%%
71+
72+
graph TD
73+
74+
Package(Packaging app)
75+
--> ExecPackage(Executing packaged app locally)
76+
--> DeployPackage(Deploying to the remote server)
77+
78+
click Package "./packaging_app.html" "Go to the document" _self
79+
click ExecPackage "./executing_packaged_app_locally.html" "Go to the document" _self
80+
click DeployPackage "./deploying_to_the_remote_server.html" "Go to the document" _self
81+
```
82+
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# Designing Workflow

docs/source/developing_with_sdk/index.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
:maxdepth: 2
66
77
core_concepts
8+
designing_workflow
89
creating_operator_classes
910
creating_application_class
1011
executing_app_locally

docs/source/introduction/architecture.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ The MONAI Deploy App SDK enables the designing of usable, reproducible, and prod
1616

1717
Below is a high-level architecture diagram of the MONAI Deploy Application SDK.
1818

19-
![image](https://user-images.githubusercontent.com/1928522/133539726-fd148075-c37e-485f-b2d5-672741488181.png)
19+
![image](https://user-images.githubusercontent.com/1928522/133837308-034cf542-d83d-4b0b-b668-1999bb7b3e30.png)
2020

2121
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.
2222

@@ -26,18 +26,18 @@ The core development-time concept in the MONAI Deploy App SDK is an inference ap
2626

2727
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.
2828

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.
3030

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.
3232

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.
3434

3535
### Run-Time Concepts
3636

3737
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.
3838

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.
4040

4141
**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.
4242

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.

docs/source/modules/datastores.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# Graphs
2+
3+
```{eval-rst}
4+
.. automodule:: monai.deploy.core.datastores
5+
:noindex:
6+
```

docs/source/modules/executors.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# Executors
2+
3+
```{eval-rst}
4+
.. automodule:: monai.deploy.core.executors
5+
:noindex:
6+
```

docs/source/modules/graphs.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# Graphs
2+
3+
```{eval-rst}
4+
.. automodule:: monai.deploy.core.graphs
5+
:noindex:
6+
```

docs/source/modules/index.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,3 +32,27 @@ operators
3232
:hidden:
3333
models
3434
```
35+
36+
## Graphs
37+
38+
```{toctree}
39+
:maxdepth: 2
40+
:hidden:
41+
graphs
42+
```
43+
44+
## Executors
45+
46+
```{toctree}
47+
:maxdepth: 2
48+
:hidden:
49+
executors
50+
```
51+
52+
## Datastores
53+
54+
```{toctree}
55+
:maxdepth: 2
56+
:hidden:
57+
datastores
58+
```

monai/deploy/core/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,10 @@
1818
input
1919
output
2020
resource
21+
IOType
2122
ExecutionContext
2223
InputContext
2324
OutputContext
24-
IOType
2525
"""
2626

2727
from .application import Application

0 commit comments

Comments
 (0)