Skip to content

Commit

Permalink
Add more explanation to the grpc demo
Browse files Browse the repository at this point in the history
  • Loading branch information
BSchilperoort committed Jan 30, 2024
1 parent 05300bd commit 84a7f21
Showing 1 changed file with 40 additions and 1 deletion.
41 changes: 40 additions & 1 deletion docs/notebooks/grpc4bmi_demo.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,13 @@
"To run this notebook you need to have grpc4bmi installed in your python environment."
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Note that your directory setup (`work_dir` and `input_dir`) may differ from this example, depending on where the config file, input directory and output directory are located."
]
},
{
"cell_type": "code",
"execution_count": 1,
Expand Down Expand Up @@ -59,7 +66,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"Initialization works like normal. Note that you do not want to have the `DockerImage` or `ExeFilePath` entries in your configuration file (!):"
"Initialization works like normal. *But note that you **do not** want to have the* `DockerImage` *or* `ExeFilePath` *entries in your configuration file*"
]
},
{
Expand Down Expand Up @@ -117,6 +124,38 @@
"model.get_value(\"respiration\", dest=np.zeros(1))"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"When finishing up, you can finalize the model, which will make the process inside the container exit cleanly:"
]
},
{
"cell_type": "code",
"execution_count": 6,
"metadata": {},
"outputs": [],
"source": [
"model.finalize()"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"To kill the docker container and remove the logs, you (explicitly) delete the object:"
]
},
{
"cell_type": "code",
"execution_count": 8,
"metadata": {},
"outputs": [],
"source": [
"del model"
]
},
{
"cell_type": "code",
"execution_count": null,
Expand Down

0 comments on commit 84a7f21

Please sign in to comment.