Skip to content

Commit 0838cd6

Browse files
authored
Fixes attempt to access removed .factories attribute (#1558)
Fixes #1557 . ### Description A few sentences describing the changes proposed in this pull request. ### Checks <!--- Put an `x` in all the boxes that apply, and remove the not applicable items --> - [ ] Avoid including large-size files in the PR. - [ ] Clean up long text outputs from code cells in the notebook. - [ ] For security purposes, please check the contents and remove any sensitive info such as user names and private key. - [ ] 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 - [ ] Notebook runs automatically `./runner.sh -t <path to .ipynb file>`
1 parent d8b9ade commit 0838cd6

File tree

2 files changed

+456
-62
lines changed

2 files changed

+456
-62
lines changed

modules/UNet_input_size_constraints.ipynb

Lines changed: 73 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
},
3737
{
3838
"cell_type": "code",
39-
"execution_count": 19,
39+
"execution_count": 1,
4040
"id": "efcd04b9",
4141
"metadata": {},
4242
"outputs": [],
@@ -55,10 +55,54 @@
5555
},
5656
{
5757
"cell_type": "code",
58-
"execution_count": 20,
58+
"execution_count": 2,
5959
"id": "86ee1f12",
6060
"metadata": {},
61-
"outputs": [],
61+
"outputs": [
62+
{
63+
"name": "stderr",
64+
"output_type": "stream",
65+
"text": [
66+
"IProgress not found. Please update jupyter and ipywidgets. See https://ipywidgets.readthedocs.io/en/stable/user_install.html\n"
67+
]
68+
},
69+
{
70+
"name": "stdout",
71+
"output_type": "stream",
72+
"text": [
73+
"MONAI version: 0+untagged.2891.gccd32ca\n",
74+
"Numpy version: 1.25.1\n",
75+
"Pytorch version: 2.0.1\n",
76+
"MONAI flags: HAS_EXT = False, USE_COMPILED = False, USE_META_DICT = False\n",
77+
"MONAI rev id: ccd32ca5e9e84562d2f388b45b6724b5c77c1f57\n",
78+
"MONAI __file__: /Users/<username>/Envs/monai/lib/python3.9/site-packages/monai/__init__.py\n",
79+
"\n",
80+
"Optional dependencies:\n",
81+
"Pytorch Ignite version: 0.4.11\n",
82+
"ITK version: 5.3.0\n",
83+
"Nibabel version: 5.1.0\n",
84+
"scikit-image version: 0.21.0\n",
85+
"scipy version: 1.11.1\n",
86+
"Pillow version: 10.0.0\n",
87+
"Tensorboard version: 2.13.0\n",
88+
"gdown version: 4.7.1\n",
89+
"TorchVision version: 0.15.2\n",
90+
"tqdm version: 4.65.0\n",
91+
"lmdb version: 1.4.1\n",
92+
"psutil version: 5.9.5\n",
93+
"pandas version: 2.0.3\n",
94+
"einops version: 0.6.1\n",
95+
"transformers version: 4.21.3\n",
96+
"mlflow version: 2.4.2\n",
97+
"pynrrd version: 1.0.0\n",
98+
"clearml version: 1.11.2rc0\n",
99+
"\n",
100+
"For details about installing the optional dependencies, please visit:\n",
101+
" https://docs.monai.io/en/latest/installation.html#installing-the-recommended-dependencies\n",
102+
"\n"
103+
]
104+
}
105+
],
62106
"source": [
63107
"from monai.networks.nets import UNet\n",
64108
"import monai\n",
@@ -91,7 +135,7 @@
91135
},
92136
{
93137
"cell_type": "code",
94-
"execution_count": 21,
138+
"execution_count": 3,
95139
"id": "fd05bcb4",
96140
"metadata": {},
97141
"outputs": [
@@ -152,7 +196,7 @@
152196
")"
153197
]
154198
},
155-
"execution_count": 21,
199+
"execution_count": 3,
156200
"metadata": {},
157201
"output_type": "execute_result"
158202
}
@@ -247,7 +291,7 @@
247291
},
248292
{
249293
"cell_type": "code",
250-
"execution_count": 22,
294+
"execution_count": 4,
251295
"id": "37f7e0e6",
252296
"metadata": {},
253297
"outputs": [],
@@ -271,7 +315,7 @@
271315
},
272316
{
273317
"cell_type": "code",
274-
"execution_count": 23,
318+
"execution_count": 5,
275319
"id": "0d5b0d70",
276320
"metadata": {},
277321
"outputs": [
@@ -291,7 +335,7 @@
291335
},
292336
{
293337
"cell_type": "code",
294-
"execution_count": 24,
338+
"execution_count": 6,
295339
"id": "3b1b4388",
296340
"metadata": {},
297341
"outputs": [
@@ -329,7 +373,7 @@
329373
},
330374
{
331375
"cell_type": "code",
332-
"execution_count": 25,
376+
"execution_count": 7,
333377
"id": "caece123",
334378
"metadata": {},
335379
"outputs": [
@@ -348,7 +392,7 @@
348392
},
349393
{
350394
"cell_type": "code",
351-
"execution_count": 26,
395+
"execution_count": 8,
352396
"id": "f67804d2",
353397
"metadata": {},
354398
"outputs": [
@@ -382,23 +426,20 @@
382426
},
383427
{
384428
"cell_type": "code",
385-
"execution_count": 27,
429+
"execution_count": 9,
386430
"id": "dc4be9d5",
387431
"metadata": {},
388432
"outputs": [
389433
{
390-
"data": {
391-
"text/plain": [
392-
"dict_keys(['INSTANCE', 'BATCH', 'GROUP', 'LAYER', 'LOCALRESPONSE', 'SYNCBATCH'])"
393-
]
394-
},
395-
"execution_count": 27,
396-
"metadata": {},
397-
"output_type": "execute_result"
434+
"name": "stdout",
435+
"output_type": "stream",
436+
"text": [
437+
"('INSTANCE', 'BATCH', 'INSTANCE_NVFUSER', 'GROUP', 'LAYER', 'LOCALRESPONSE', 'SYNCBATCH')\n"
438+
]
398439
}
399440
],
400441
"source": [
401-
"monai.networks.layers.factories.Norm.factories.keys()"
442+
"print(monai.networks.layers.factories.Norm.names)"
402443
]
403444
},
404445
{
@@ -428,7 +469,7 @@
428469
},
429470
{
430471
"cell_type": "code",
431-
"execution_count": 28,
472+
"execution_count": 10,
432473
"id": "732f2769",
433474
"metadata": {},
434475
"outputs": [],
@@ -461,7 +502,7 @@
461502
},
462503
{
463504
"cell_type": "code",
464-
"execution_count": 29,
505+
"execution_count": 11,
465506
"id": "0a33cc15",
466507
"metadata": {},
467508
"outputs": [],
@@ -486,17 +527,17 @@
486527
},
487528
{
488529
"cell_type": "code",
489-
"execution_count": 30,
530+
"execution_count": 12,
490531
"id": "23d75904",
491532
"metadata": {},
492533
"outputs": [
493534
{
494535
"data": {
495536
"text/plain": [
496-
"tensor([[[[[-0.7587]]]]])"
537+
"tensor([[[[[-0.6150]]]]])"
497538
]
498539
},
499-
"execution_count": 30,
540+
"execution_count": 12,
500541
"metadata": {},
501542
"output_type": "execute_result"
502543
}
@@ -636,7 +677,7 @@
636677
},
637678
{
638679
"cell_type": "code",
639-
"execution_count": 31,
680+
"execution_count": 13,
640681
"id": "1bdc5c8e",
641682
"metadata": {},
642683
"outputs": [
@@ -671,7 +712,7 @@
671712
},
672713
{
673714
"cell_type": "code",
674-
"execution_count": 32,
715+
"execution_count": 14,
675716
"id": "7485a83a",
676717
"metadata": {},
677718
"outputs": [
@@ -702,7 +743,7 @@
702743
},
703744
{
704745
"cell_type": "code",
705-
"execution_count": 33,
746+
"execution_count": 15,
706747
"id": "6a31861f",
707748
"metadata": {},
708749
"outputs": [
@@ -770,7 +811,7 @@
770811
},
771812
{
772813
"cell_type": "code",
773-
"execution_count": 34,
814+
"execution_count": 16,
774815
"id": "d234f140",
775816
"metadata": {},
776817
"outputs": [
@@ -806,7 +847,7 @@
806847
},
807848
{
808849
"cell_type": "code",
809-
"execution_count": 35,
850+
"execution_count": 17,
810851
"id": "ccf53aa1",
811852
"metadata": {},
812853
"outputs": [
@@ -842,7 +883,7 @@
842883
},
843884
{
844885
"cell_type": "code",
845-
"execution_count": 36,
886+
"execution_count": 18,
846887
"id": "da6e9277",
847888
"metadata": {},
848889
"outputs": [
@@ -894,7 +935,7 @@
894935
"name": "python",
895936
"nbconvert_exporter": "python",
896937
"pygments_lexer": "ipython3",
897-
"version": "3.8.10"
938+
"version": "3.9.16"
898939
}
899940
},
900941
"nbformat": 4,

0 commit comments

Comments
 (0)