Skip to content

Commit 840a399

Browse files
KumoLiuericspod
andauthored
Fix pydicom version in TCIA tutorial (#1958)
Fixes #1901 ### Description The `_storage_sopclass_uids` module has been removed since version 3.0. pydicom-seg didn't update accordingly, we can only fixed the version for now. https://pydicom.github.io/pydicom/dev/release_notes/index.html#removals https://www.piwheels.org/project/pydicom-seg/ ### 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>` Signed-off-by: YunLiu <[email protected]> Co-authored-by: Eric Kerfoot <[email protected]>
1 parent 9f6d19f commit 840a399

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

model_zoo/TCIA_PROSTATEx_Prostate_MRI_Anatomy_Model.ipynb

+2-2
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@
116116
"!python -c \"import cv2\" || pip install -q opencv-python-headless\n",
117117
"\n",
118118
"# These are the libraries used to read DICOM Seg objects.\n",
119-
"!python -m pip install -q pydicom pydicom-seg\n",
119+
"!python -m pip install -q pydicom==2.4.4 pydicom-seg\n",
120120
"\n",
121121
"# Install tcia_utils to download the datasets.\n",
122122
"!python -m pip install --upgrade -q --no-deps tcia_utils\n",
@@ -500,7 +500,7 @@
500500
},
501501
"outputs": [],
502502
"source": [
503-
"model.load_state_dict(torch.load(checkpoint, map_location=device))\n",
503+
"model.load_state_dict(torch.load(checkpoint, map_location=device, weights_only=True))\n",
504504
"model.eval()\n",
505505
"results = []\n",
506506
"with torch.no_grad():\n",

0 commit comments

Comments
 (0)