Skip to content

Commit 799f40b

Browse files
Add notebook for pythonic bundle access (#1501)
Fixes #1502 . ### Description In this PR, we'll explore how to access a bundle in Python and use it in your own application which cover the following topics: 1. Downloading the Bundle 2. Creating a `BundleWorkflow` 3. Getting Properties from the Bundle 4. Using Pretrained Weights from the Bundle 5. Updating Properties 6. Using Components in Your Own Pipeline ### Checks <!--- Put an `x` in all the boxes that apply, and remove the not applicable items --> - [x] Avoid including large-size files in the PR. - [x] Clean up long text outputs from code cells in the notebook. - [x] For security purposes, please check the contents and remove any sensitive info such as user names and private key. - [x] Ensure (1) hyperlinks and markdown anchors are working (2) use relative paths for tutorial repo files (3) put figure and graphs in the `./figure` folder - [x] Notebook runs automatically `./runner.sh -t <path to .ipynb file>` --------- Signed-off-by: KumoLiu <[email protected]> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
1 parent 8a5c8a6 commit 799f40b

File tree

2 files changed

+608
-0
lines changed

2 files changed

+608
-0
lines changed
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
# Pythonic Bundle Access Tutorial
2+
3+
A MONAI bundle contains the stored weights of a model, training, inference, post-processing transform sequences and other information. This tutorial aims to explore how to access a bundle in Python and use it in your own application. We'll cover the following topics:
4+
1. Downloading the Bundle.
5+
2. Creating a `BundleWorkflow`.
6+
3. Getting Properties from the Bundle.
7+
4. Updating Properties.
8+
5. Using Components in Your Own Pipeline.
9+
6. Utilizing Pretrained Weights from the Bundle.
10+
7. A Simple Comparison of the Usage between `ConfigParser` and `BundleWorkflow`.
11+
12+
The example training dataset is Task09_Spleen.tar from http://medicaldecathlon.com/.
13+
14+
## Requirements
15+
16+
The script is tested with:
17+
18+
- `Ubuntu 20.04` | `Python 3.8.10` | `CUDA 12.2` | `Pytorch 1.13.1`
19+
20+
- it is tested on 24gb single-gpu machine
21+
22+
## Dependencies and installation
23+
24+
### MONAI
25+
26+
You can conda environments to install the dependencies.
27+
28+
or you can just use MONAI docker.
29+
```bash
30+
docker pull projectmonai/monai:latest
31+
```
32+
33+
For more information please check out [the installation guide](https://docs.monai.io/en/latest/installation.html).
34+
35+
## Questions and bugs
36+
37+
- For questions relating to the use of MONAI, please use our [Discussions tab](https://github.com/Project-MONAI/MONAI/discussions) on the main repository of MONAI.
38+
- For bugs relating to MONAI functionality, please create an issue on the [main repository](https://github.com/Project-MONAI/MONAI/issues).
39+
- For bugs relating to the running of a tutorial, please create an issue in [this repository](https://github.com/Project-MONAI/Tutorials/issues).

0 commit comments

Comments
 (0)