Skip to content

Commit

Permalink
Merge branch 'Project-MONAI:main' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
virginiafdez authored Sep 18, 2024
2 parents 433fd62 + 29fba69 commit 524ef2f
Show file tree
Hide file tree
Showing 9 changed files with 4,027 additions and 466 deletions.
212 changes: 118 additions & 94 deletions bundle/01_bundle_intro.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
},
{
"cell_type": "code",
"execution_count": null,
"execution_count": 1,
"id": "1bf88e03-1c87-4901-9cfb-9c626d454b98",
"metadata": {},
"outputs": [],
Expand Down Expand Up @@ -101,7 +101,7 @@
},
{
"cell_type": "code",
"execution_count": 1,
"execution_count": 3,
"id": "a1d9d107-58d6-4ed8-9cf1-6e9103e78a92",
"metadata": {},
"outputs": [
Expand Down Expand Up @@ -140,7 +140,7 @@
},
{
"cell_type": "code",
"execution_count": 2,
"execution_count": 4,
"id": "3e19c030-4e03-4a96-a127-ee0daa604052",
"metadata": {},
"outputs": [
Expand All @@ -153,10 +153,10 @@
" \"changelog\": {\n",
" \"0.0.1\": \"Initial version\"\n",
" },\n",
" \"monai_version\": \"1.2.0\",\n",
" \"pytorch_version\": \"2.0.0\",\n",
" \"numpy_version\": \"1.23.5\",\n",
" \"optional_packages_version\": {},\n",
" \"monai_version\": \"1.4.0\",\n",
" \"pytorch_version\": \"2.5.0\",\n",
" \"numpy_version\": \"1.24.4\",\n",
" \"required_packages_version\": {},\n",
" \"task\": \"Describe what the network predicts\",\n",
" \"description\": \"A longer description of what the network does, use context, inputs, outputs, etc.\",\n",
" \"authors\": \"Your Name Here\",\n",
Expand All @@ -183,7 +183,7 @@
},
{
"cell_type": "code",
"execution_count": 2,
"execution_count": 5,
"id": "a56e4833-171c-432c-8145-f325fad3bfcb",
"metadata": {},
"outputs": [
Expand All @@ -206,7 +206,7 @@
" \"monai_version\": \"1.2.0\",\n",
" \"pytorch_version\": \"2.0.0\",\n",
" \"numpy_version\": \"1.23.5\",\n",
" \"optional_packages_version\": {},\n",
" \"required_packages_version\": {},\n",
" \"name\": \"TestBundle\",\n",
" \"task\": \"Demonstration Bundle Network\",\n",
" \"description\": \"This is a demonstration bundle meant to showcase features of the MONAI bundle system only and does nothing useful\",\n",
Expand Down Expand Up @@ -238,7 +238,7 @@
},
{
"cell_type": "code",
"execution_count": 32,
"execution_count": 6,
"id": "63322909-1a24-426e-a744-39452cdff14f",
"metadata": {},
"outputs": [
Expand Down Expand Up @@ -288,67 +288,61 @@
},
{
"cell_type": "code",
"execution_count": 33,
"execution_count": 7,
"id": "7968ceb4-89ef-40a9-ac9b-f048c6cca73b",
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"2023-07-14 15:34:52,646 - INFO - --- input summary of monai.bundle.scripts.run ---\n",
"2023-07-14 15:34:52,647 - INFO - > run_id: 'test_config'\n",
"2023-07-14 15:34:52,647 - INFO - > meta_file: './TestBundle/configs/metadata.json'\n",
"2023-07-14 15:34:52,647 - INFO - > config_file: './TestBundle/configs/test_config.yaml'\n",
"2023-07-14 15:34:52,647 - INFO - ---\n",
"2024-09-18 08:15:12,299 - INFO - --- input summary of monai.bundle.scripts.run ---\n",
"2024-09-18 08:15:12,299 - INFO - > config_file: './TestBundle/configs/test_config.yaml'\n",
"2024-09-18 08:15:12,299 - INFO - > meta_file: './TestBundle/configs/metadata.json'\n",
"2024-09-18 08:15:12,299 - INFO - > run_id: 'test_config'\n",
"2024-09-18 08:15:12,299 - INFO - ---\n",
"\n",
"\n"
]
},
{
"name": "stderr",
"output_type": "stream",
"text": [
"/home/localek10/workspace/monai/MONAI_mine/monai/bundle/workflows.py:213: UserWarning: Default logging file in 'configs/logging.conf' does not exist, skipping logging.\n",
" warnings.warn(\"Default logging file in 'configs/logging.conf' does not exist, skipping logging.\")\n"
]
},
{
"name": "stdout",
"output_type": "stream",
"text": [
"MONAI version: 1.2.0\n",
"Numpy version: 1.23.5\n",
"Pytorch version: 2.0.0\n",
"MONAI version: 1.4.0\n",
"Numpy version: 1.24.4\n",
"Pytorch version: 2.5.0a0+872d972e41.nv24.08\n",
"MONAI flags: HAS_EXT = False, USE_COMPILED = False, USE_META_DICT = False\n",
"MONAI rev id: c33f1ba588ee00229a309000e888f9817b4f1934\n",
"MONAI __file__: /home/localek10/workspace/monai/MONAI_mine/monai/__init__.py\n",
"MONAI rev id: ab3ee18ba32bb9bd67cd3a55717684bbd343c94c\n",
"MONAI __file__: /workspace/Code/MONAI/monai/__init__.py\n",
"\n",
"Optional dependencies:\n",
"Pytorch Ignite version: 0.4.12\n",
"ITK version: NOT INSTALLED or UNKNOWN VERSION.\n",
"Nibabel version: 5.0.1\n",
"scikit-image version: NOT INSTALLED or UNKNOWN VERSION.\n",
"Pillow version: 9.4.0\n",
"Tensorboard version: NOT INSTALLED or UNKNOWN VERSION.\n",
"gdown version: NOT INSTALLED or UNKNOWN VERSION.\n",
"TorchVision version: 0.15.0\n",
"tqdm version: 4.65.0\n",
"lmdb version: NOT INSTALLED or UNKNOWN VERSION.\n",
"psutil version: 5.9.0\n",
"pandas version: 1.5.3\n",
"einops version: 0.6.1\n",
"transformers version: NOT INSTALLED or UNKNOWN VERSION.\n",
"mlflow version: NOT INSTALLED or UNKNOWN VERSION.\n",
"pynrrd version: NOT INSTALLED or UNKNOWN VERSION.\n",
"Pytorch Ignite version: 0.4.11\n",
"ITK version: 5.4.0\n",
"Nibabel version: 5.2.1\n",
"scikit-image version: 0.23.2\n",
"scipy version: 1.14.0\n",
"Pillow version: 10.4.0\n",
"Tensorboard version: 2.16.2\n",
"gdown version: 5.2.0\n",
"TorchVision version: 0.20.0a0\n",
"tqdm version: 4.66.5\n",
"lmdb version: 1.5.1\n",
"psutil version: 6.0.0\n",
"pandas version: 2.2.2\n",
"einops version: 0.8.0\n",
"transformers version: 4.40.2\n",
"mlflow version: 2.16.0\n",
"pynrrd version: 1.0.0\n",
"clearml version: 1.16.4\n",
"\n",
"For details about installing the optional dependencies, please visit:\n",
" https://docs.monai.io/en/latest/installation.html#installing-the-recommended-dependencies\n",
"\n",
"Test tensor: tensor([[0.5281, 0.1114, 0.5124, 0.2523],\n",
" [0.6561, 0.0298, 0.6393, 0.8636],\n",
" [0.3730, 0.8315, 0.1390, 0.6233],\n",
" [0.2646, 0.8929, 0.5250, 0.0472]], device='cuda:0')\n"
"Test tensor: tensor([[0.7786, 0.5913, 0.6661, 0.2732],\n",
" [0.6756, 0.3978, 0.7760, 0.7936],\n",
" [0.0093, 0.6293, 0.1988, 0.0280],\n",
" [0.8460, 0.5727, 0.6339, 0.7825]], device='cuda:0')\n"
]
}
],
Expand Down Expand Up @@ -384,15 +378,15 @@
},
{
"cell_type": "code",
"execution_count": 30,
"execution_count": 8,
"id": "cb762695-8c5d-4f42-9c29-eb6260990b0c",
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Overwriting TestBundle/configs/test_object.yaml\n"
"Writing TestBundle/configs/test_object.yaml\n"
]
}
],
Expand All @@ -415,24 +409,30 @@
},
{
"cell_type": "code",
"execution_count": 31,
"execution_count": 9,
"id": "2cd1287c-f287-4831-bfc7-4cbdc394a3a1",
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"2023-07-14 15:28:36,063 - INFO - --- input summary of monai.bundle.scripts.run ---\n",
"2023-07-14 15:28:36,063 - INFO - > run_id: 'test'\n",
"2023-07-14 15:28:36,063 - INFO - > meta_file: './TestBundle/configs/metadata.json'\n",
"2023-07-14 15:28:36,063 - INFO - > config_file: './TestBundle/configs/test_object.yaml'\n",
"2023-07-14 15:28:36,063 - INFO - ---\n",
"\n",
"2024-09-18 08:15:22,338 - INFO - --- input summary of monai.bundle.scripts.run ---\n",
"2024-09-18 08:15:22,338 - INFO - > config_file: './TestBundle/configs/test_object.yaml'\n",
"2024-09-18 08:15:22,338 - INFO - > meta_file: './TestBundle/configs/metadata.json'\n",
"2024-09-18 08:15:22,338 - INFO - > run_id: 'test'\n",
"2024-09-18 08:15:22,338 - INFO - ---\n",
"\n",
"Dataset <monai.data.dataset.Dataset object at 0x7fa6d117f100>\n",
"\n"
]
},
{
"name": "stdout",
"output_type": "stream",
"text": [
"Dataset <monai.data.dataset.Dataset object at 0x7f1777fd7b20>\n",
"Size 10\n",
"Transform member None\n",
"Transform member <monai.transforms.compose.Compose object at 0x7f1777fd5a20>\n",
"Values [{0: 0}, {1: 1}, {2: 4}, {3: 9}, {4: 16}, {5: 25}, {6: 36}, {7: 49}, {8: 64}, {9: 81}]\n"
]
}
Expand Down Expand Up @@ -470,7 +470,7 @@
},
{
"cell_type": "code",
"execution_count": 20,
"execution_count": 10,
"id": "391ec82b-43a2-4b6f-8307-e3c853986719",
"metadata": {},
"outputs": [
Expand All @@ -496,43 +496,61 @@
},
{
"cell_type": "code",
"execution_count": 21,
"execution_count": 11,
"id": "229617a0-1120-4054-9232-1991cfa21ae9",
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"2023-07-14 15:22:37,435 - INFO - --- input summary of monai.bundle.scripts.run ---\n",
"2023-07-14 15:22:37,435 - INFO - > run_id: 'test'\n",
"2023-07-14 15:22:37,436 - INFO - > meta_file: './TestBundle/configs/metadata.json'\n",
"2023-07-14 15:22:37,436 - INFO - > config_file: './TestBundle/configs/test_cmdline.yaml'\n",
"2023-07-14 15:22:37,436 - INFO - ---\n",
"\n",
"2024-09-18 08:15:32,092 - INFO - --- input summary of monai.bundle.scripts.run ---\n",
"2024-09-18 08:15:32,092 - INFO - > config_file: './TestBundle/configs/test_cmdline.yaml'\n",
"2024-09-18 08:15:32,092 - INFO - > meta_file: './TestBundle/configs/metadata.json'\n",
"2024-09-18 08:15:32,092 - INFO - > run_id: 'test'\n",
"2024-09-18 08:15:32,092 - INFO - ---\n",
"\n",
"\n"
]
},
{
"name": "stdout",
"output_type": "stream",
"text": [
"Height 8\n",
"Width 8\n",
"Area 64\n",
"2023-07-14 15:22:40,876 - INFO - --- input summary of monai.bundle.scripts.run ---\n",
"2023-07-14 15:22:40,876 - INFO - > run_id: 'test'\n",
"2023-07-14 15:22:40,876 - INFO - > meta_file: './TestBundle/configs/metadata.json'\n",
"2023-07-14 15:22:40,876 - INFO - > config_file: './TestBundle/configs/test_cmdline.yaml'\n",
"2023-07-14 15:22:40,876 - INFO - > shape#0: 4\n",
"2023-07-14 15:22:40,876 - INFO - ---\n",
"\n",
"2024-09-18 08:15:41,817 - INFO - --- input summary of monai.bundle.scripts.run ---\n",
"2024-09-18 08:15:41,817 - INFO - > config_file: './TestBundle/configs/test_cmdline.yaml'\n",
"2024-09-18 08:15:41,817 - INFO - > meta_file: './TestBundle/configs/metadata.json'\n",
"2024-09-18 08:15:41,817 - INFO - > run_id: 'test'\n",
"2024-09-18 08:15:41,817 - INFO - > shape#0: 4\n",
"2024-09-18 08:15:41,817 - INFO - ---\n",
"\n",
"\n"
]
},
{
"name": "stdout",
"output_type": "stream",
"text": [
"Height 4\n",
"Width 8\n",
"Area 32\n",
"2023-07-14 15:22:44,279 - INFO - --- input summary of monai.bundle.scripts.run ---\n",
"2023-07-14 15:22:44,279 - INFO - > run_id: 'test'\n",
"2023-07-14 15:22:44,279 - INFO - > meta_file: './TestBundle/configs/metadata.json'\n",
"2023-07-14 15:22:44,279 - INFO - > config_file: './TestBundle/configs/test_cmdline.yaml'\n",
"2023-07-14 15:22:44,279 - INFO - > area: 32\n",
"2023-07-14 15:22:44,279 - INFO - ---\n",
"\n",
"2024-09-18 08:15:51,574 - INFO - --- input summary of monai.bundle.scripts.run ---\n",
"2024-09-18 08:15:51,574 - INFO - > config_file: './TestBundle/configs/test_cmdline.yaml'\n",
"2024-09-18 08:15:51,574 - INFO - > meta_file: './TestBundle/configs/metadata.json'\n",
"2024-09-18 08:15:51,574 - INFO - > run_id: 'test'\n",
"2024-09-18 08:15:51,574 - INFO - > area: 32\n",
"2024-09-18 08:15:51,574 - INFO - ---\n",
"\n",
"\n"
]
},
{
"name": "stdout",
"output_type": "stream",
"text": [
"Height 8\n",
"Width 8\n",
"Area 32\n"
Expand Down Expand Up @@ -574,7 +592,7 @@
},
{
"cell_type": "code",
"execution_count": 17,
"execution_count": 12,
"id": "55c034c5-b03f-4ac1-8aa0-a7b768bbbb7e",
"metadata": {},
"outputs": [
Expand All @@ -595,7 +613,7 @@
},
{
"cell_type": "code",
"execution_count": 18,
"execution_count": 13,
"id": "2511798a-cd44-4aec-954c-c766b29f0a43",
"metadata": {},
"outputs": [
Expand All @@ -618,21 +636,27 @@
},
{
"cell_type": "code",
"execution_count": 19,
"execution_count": 14,
"id": "dc6adf63-c4b5-4f97-805a-2321dc1e8d2c",
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"2023-07-14 15:09:59,663 - INFO - --- input summary of monai.bundle.scripts.run ---\n",
"2023-07-14 15:09:59,663 - INFO - > run_id: 'test'\n",
"2023-07-14 15:09:59,663 - INFO - > meta_file: './TestBundle/configs/metadata.json'\n",
"2023-07-14 15:09:59,663 - INFO - > config_file: ['./TestBundle/configs/multifile1.yaml', './TestBundle/configs/multifile2.yaml']\n",
"2023-07-14 15:09:59,663 - INFO - ---\n",
"\n",
"2024-09-18 08:16:01,272 - INFO - --- input summary of monai.bundle.scripts.run ---\n",
"2024-09-18 08:16:01,273 - INFO - > config_file: ['./TestBundle/configs/multifile1.yaml', './TestBundle/configs/multifile2.yaml']\n",
"2024-09-18 08:16:01,273 - INFO - > meta_file: './TestBundle/configs/metadata.json'\n",
"2024-09-18 08:16:01,273 - INFO - > run_id: 'test'\n",
"2024-09-18 08:16:01,273 - INFO - ---\n",
"\n",
"\n"
]
},
{
"name": "stdout",
"output_type": "stream",
"text": [
"Area 64\n"
]
}
Expand Down Expand Up @@ -676,9 +700,9 @@
],
"metadata": {
"kernelspec": {
"display_name": "Python [conda env:monai]",
"display_name": "Python 3",
"language": "python",
"name": "conda-env-monai-py"
"name": "python3"
},
"language_info": {
"codemirror_mode": {
Expand All @@ -690,7 +714,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.10.10"
"version": "3.10.12"
}
},
"nbformat": 4,
Expand Down
Loading

0 comments on commit 524ef2f

Please sign in to comment.