Skip to content

Commit d80a4da

Browse files
committed
[DLMED] update tutorial
Signed-off-by: Nic Ma <[email protected]>
1 parent 0b30d31 commit d80a4da

File tree

1 file changed

+19
-6
lines changed

1 file changed

+19
-6
lines changed

modules/bundles/get_started.ipynb

Lines changed: 19 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -164,8 +164,6 @@
164164
" \"$import os\",\n",
165165
" \"$import ignite\"\n",
166166
" ],\n",
167-
" \"determinism\": \"$monai.utils.set_determinism(seed=123)\",\n",
168-
" \"cudnn_opt\": \"$setattr(torch.backends.cudnn, 'benchmark', True)\",\n",
169167
" \"device\": \"$torch.device('cuda:0' if torch.cuda.is_available() else 'cpu')\",\n",
170168
" \"ckpt_path\": \"/workspace/data/models/model.pt\",\n",
171169
" \"dataset_dir\": \"/workspace/data/Task09_Spleen\",\n",
@@ -513,14 +511,29 @@
513511
"\n",
514512
"There are several predefined scripts in MONAI bundle module to help execute `regular training`, `metadata verification base on schema`, `network input / output verification`, `export to TorchScript model`, etc.\n",
515513
"\n",
516-
"Here we leverage the `run` script and specify the ID of trainer in the config."
514+
"Here we leverage the `run` script and specify the ID of trainer in the config.\n",
515+
"\n",
516+
"Just define the entry point expressions in the config to execute in order, and specify the `runner_id` in CLI script."
517+
]
518+
},
519+
{
520+
"cell_type": "markdown",
521+
"metadata": {},
522+
"source": [
523+
"```json\n",
524+
"\"training\": [\n",
525+
" \"$monai.utils.set_determinism(seed=123)\",\n",
526+
" \"$setattr(torch.backends.cudnn, 'benchmark', True)\",\n",
527+
" \"$@train#trainer.run()\"\n",
528+
"]\n",
529+
"```"
517530
]
518531
},
519532
{
520533
"cell_type": "markdown",
521534
"metadata": {},
522535
"source": [
523-
"`python -m monai.bundle run \"'train#trainer'\" --config_file configs/train.json`"
536+
"`python -m monai.bundle run training --config_file configs/train.json`"
524537
]
525538
},
526539
{
@@ -538,7 +551,7 @@
538551
"cell_type": "markdown",
539552
"metadata": {},
540553
"source": [
541-
"`python -m monai.bundle run \"'train#trainer'\" --config_file configs/train.json --device \"\\$torch.device('cuda:1')\"`"
554+
"`python -m monai.bundle run training --config_file configs/train.json --device \"\\$torch.device('cuda:1')\"`"
542555
]
543556
},
544557
{
@@ -552,7 +565,7 @@
552565
"cell_type": "markdown",
553566
"metadata": {},
554567
"source": [
555-
"`python -m monai.bundle run \"'train#trainer'\" --config_file configs/train.json --network \"%configs/test.json#network\"`"
568+
"`python -m monai.bundle run training --config_file configs/train.json --network \"%configs/test.json#network\"`"
556569
]
557570
},
558571
{

0 commit comments

Comments
 (0)