Skip to content

Commit 3370e1c

Browse files
committed
update toc
Signed-off-by: Wenqi Li <[email protected]>
1 parent 99f83ad commit 3370e1c

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

docs/source/config_syntax.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@ The main benefits are threefold:
88
- it describes workflow at a relatively high level and allows for different low-level implementations.
99
- learning paradigms at a higher level such as federated learning and AutoML can be decoupled from the component details.
1010

11+
- [A basic example](#a-basic-example)
12+
- [Syntax examples explained](#syntax-examples-explained)
13+
1114
## A basic example
1215

1316
Components as part of a workflow can be specified using `JSON` or `YAML` syntax, for example, a network architecture
@@ -62,10 +65,14 @@ or additionally, tune the input parameters then instantiate the component:
6265
BasicUNet features: (32, 32, 32, 64, 64, 64).
6366
```
6467

68+
For more details on the `ConfigParser` API, please see https://docs.monai.io/en/latest/bundle.html#config-parser.
69+
6570
## Syntax examples explained
6671

6772
A few characters and keywords are interpreted beyond the plain texts, here are examples of the syntax:
6873

74+
### `@` to interpolate with Python objects
75+
6976
```json
7077
"@preprocessing#transforms#keys"
7178
```
@@ -79,6 +86,8 @@ where `#` indicates a sub-structure of this configuration file.
7986

8087
_Description:_ `1` is interpreted as an integer, which is used to index the `preprocessing` sub-structure.
8188

89+
### `$` to evaluate as Python expressions
90+
8291
```json
8392
"$print(42)"
8493
```
@@ -91,6 +100,8 @@ _Description:_ `$` is a special character to indicate evaluating `print(42)` at
91100

92101
_Description:_ Create a list at runtime using the values in `datalist` as input.
93102

103+
### `_target_` to instantiate a Python object
104+
94105
```json
95106
{
96107
"demo_name":{

0 commit comments

Comments
 (0)