Skip to content

Commit 0947b2a

Browse files
authored
Merge pull request #464 from Dana-Farber-AIOS/pydicom_update
Pydicom update
2 parents 2b68881 + 25b5c46 commit 0947b2a

11 files changed

Lines changed: 71 additions & 74 deletions

File tree

.github/workflows/publish-to-pypi.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,10 @@ jobs:
1313
- name: Checkout Code
1414
uses: actions/checkout@v4
1515

16-
- name: Set Up Python 3.9
16+
- name: Set Up Python 3.10
1717
uses: actions/setup-python@v5
1818
with:
19-
python-version: '3.9'
19+
python-version: '3.10'
2020

2121
- name: Install Build Tool
2222
run: pip install --upgrade build

.github/workflows/tests-linux.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818
# Limit concurrency to reduce memory pressure
1919
max-parallel: 2
2020
matrix:
21-
python-version: ["3.9", "3.10"]
21+
python-version: ["3.10", "3.11", "3.12"]
2222
timeout-minutes: 60
2323

2424
steps:
@@ -69,7 +69,7 @@ jobs:
6969

7070
- name: Install lightweight torchvision
7171
shell: bash -l {0}
72-
run: pip install torchvision==0.14.1 --no-cache-dir
72+
run: pip install torchvision==0.23.0 --no-cache-dir
7373

7474
- name: Aggressive disk cleanup
7575
run: |
@@ -85,7 +85,7 @@ jobs:
8585
shell: bash -l {0}
8686
run: |
8787
micromamba activate pathml
88-
pip install "numpy==1.23.5" "coverage<7.3" "numba==0.59.1" --force-reinstall --no-cache-dir
88+
pip install "numpy>=1.26,<2" "coverage>=7.4,<8" "numba>=0.60,<0.62" --force-reinstall --no-cache-dir
8989
python -m coverage --version
9090
python -c "import numba; print('Numba version:', numba.__version__)"
9191

.github/workflows/tests-macos.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717
fail-fast: false
1818
matrix:
1919
os: [macos-latest]
20-
python-version: ["3.8", "3.9", "3.10"]
20+
python-version: ["3.10", "3.11", "3.12"]
2121

2222
steps:
2323
- uses: actions/checkout@v2
@@ -57,15 +57,15 @@ jobs:
5757

5858
- name: Install torchvision
5959
shell: bash -l {0}
60-
run: pip install torchvision==0.14.1
60+
run: pip install torchvision==0.23.0
6161

6262
- name: Fix coverage-numba incompatibility
6363
shell: bash -l {0}
6464
run: |
65-
micromamba activate pathml
66-
pip install "numpy==1.23.5" "coverage<7.3" "numba==0.59.1" --force-reinstall
67-
python -m coverage --version
68-
python -c "import numba; print('Numba version:', numba.__version__)"
65+
micromamba activate pathml
66+
pip install "numpy>=1.26,<2" "coverage>=7.4,<8" "numba>=0.60,<0.62" --force-reinstall --no-cache-dir
67+
python -m coverage --version
68+
python -c "import numba; print('Numba version:', numba.__version__)"
6969
7070
- name: Test other modules with pytest and generate coverage
7171
shell: bash -l {0}

.github/workflows/tests-windows.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717
strategy:
1818
max-parallel: 5
1919
matrix:
20-
python-version: [ "3.9", "3.10"]
20+
python-version: ["3.10", "3.11", "3.12"]
2121
timeout-minutes: 120
2222

2323
steps:
@@ -101,7 +101,7 @@ jobs:
101101

102102
- name: Install torchvision
103103
shell: bash -l {0}
104-
run: pip install torchvision==0.14.1
104+
run: pip install torchvision==0.23.0
105105

106106
- name: Set OPENSLIDE_PATH
107107
run: echo "OPENSLIDE_PATH=D:\a\pathml\pathml\openslide-binaries\openslide-win64-20231011\bin" >> $GITHUB_ENV
@@ -110,8 +110,8 @@ jobs:
110110
- name: Fix coverage-numba incompatibility
111111
shell: bash -l {0}
112112
run: |
113-
micromamba activate pathml
114-
pip install "numpy==1.23.5" "coverage<7.3" "numba==0.59.1" --force-reinstall
113+
micromamba activate pathml
114+
pip install "numpy>=1.26,<2" "coverage>=7.4,<8" "numba>=0.60,<0.62" --force-reinstall --no-cache-dir
115115
python -m coverage --version
116116
python -c "import numba; print('Numba version:', numba.__version__)"
117117

environment.yml

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -5,35 +5,35 @@ channels:
55
- pytorch
66

77
dependencies:
8-
- python<=3.10
8+
- python>=3.10
99
- pip==25.0.1
10-
- numpy==1.23.5
11-
- scipy<=1.11.4
10+
- numpy>=1.26.4,<2
11+
- scipy>=1.12,<2
1212
- scikit-image<=0.22.0
13-
- matplotlib<=3.8.2
13+
- matplotlib>=3.8.0
1414
- openjdk<=18.0.0
1515
- h5py==3.10.0
1616
- dask<=2023.12.1
17-
- pydicom==2.4.4
17+
- pydicom==3.0.2
1818
- pytest==7.4.3
1919
- pre-commit<=3.6.0
20-
- coverage==7.2.7
20+
- coverage==7.4.0
2121
- networkx<=3.2.1
2222
- pip:
2323
- -r requirements/requirements_torch.txt
2424
# - coverage==7.2.7
2525
- numba>=0.59
26-
- python-bioformats==4.0.7
27-
- python-javabridge==4.0.3
26+
- python-bioformats==4.1.0
27+
- python-javabridge==4.0.4
2828
- protobuf==3.20.3
2929
- onnx==1.17.0
30-
- onnxruntime==1.16.3
30+
- onnxruntime>=1.17.0,<1.18
3131
- opencv-contrib-python==4.8.1.78
3232
- openslide-python==1.3.1
3333
- scanpy==1.9.6
34-
- anndata<=0.10.3
34+
- anndata>=0.7.6,<=0.10.3,
3535
- tqdm==4.66.3
3636
- loguru==0.7.2
3737
- pandas<=2.1.4
3838
- torch-geometric==2.3.1
39-
- jpype1==1.4.1
39+
- jpype1>=1.5.0

pathml/_version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@
33
License: GNU GPL 2.0
44
"""
55

6-
__version__ = "3.0.4"
6+
__version__ = "3.0.5"

pathml/datasets/datasets.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -132,21 +132,21 @@ def __getitem__(self, index):
132132

133133
# Load cell graphs, tissue graphs and assignments if they are provided
134134
if self.cell_dir is not None:
135-
cell_graph = torch.load(self.cell_graphs[index])
135+
cell_graph = torch.load(self.cell_graphs[index], weights_only=False)
136136
if hasattr(cell_graph, "target"):
137137
target = cell_graph["target"]
138138
else:
139139
target = None
140140

141141
if self.tissue_dir is not None:
142-
tissue_graph = torch.load(self.tissue_graphs[index])
142+
tissue_graph = torch.load(self.tissue_graphs[index], weights_only=False)
143143
if hasattr(tissue_graph, "target"):
144144
target = tissue_graph["target"]
145145
else:
146146
target = None
147147

148148
if self.assign_dir is not None:
149-
assignment = torch.load(self.assigns[index])
149+
assignment = torch.load(self.assigns[index], weights_only=False)
150150

151151
# Create pathml.graph.utils.HACTPairData object with prvided objects
152152
data = HACTPairData(

requirements/environment_docker.yml

Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -5,34 +5,33 @@ channels:
55
- pytorch
66

77
dependencies:
8-
- python>=3.9,<3.11
8+
- python>=3.10,<=3.12
99
- pip==25.0.1
10-
- numpy==1.23.5
11-
- scipy<=1.11.4
10+
- numpy>=1.26.4,<2
11+
- scipy>=1.12,<2
1212
- scikit-image<=0.22.0
13-
- matplotlib<=3.8.2
13+
- matplotlib>=3.8.0
1414
- openjdk<=18.0.0
1515
- h5py==3.10.0
1616
- dask<=2023.12.1
17-
- pydicom==2.4.4
18-
- coverage<7.3
17+
- pydicom==3.0.2
1918
- pytest==7.4.3
2019
- pre-commit<=3.6.0
21-
- coverage==7.2.7
20+
- coverage==7.4.0
2221
- networkx<=3.2.1
2322
- pip:
2423
- torch==2.6.0
25-
- python-bioformats==4.0.7
26-
- python-javabridge==4.0.3
24+
- python-bioformats==4.1.0
25+
- python-javabridge==4.0.4
2726
- protobuf==3.20.3
2827
- onnx==1.17.0
29-
- onnxruntime==1.16.3
28+
- onnxruntime>=1.17.0,<1.18
3029
- opencv-contrib-python==4.8.1.78
3130
- openslide-python==1.3.1
3231
- scanpy==1.9.6
33-
- anndata<=0.10.3
32+
- anndata>=0.7.6,<=0.10.3
3433
- tqdm==4.66.1
3534
- loguru==0.7.2
3635
- pandas<=2.1.4
3736
- torch-geometric==2.3.1
38-
- jpype1==1.4.1
37+
- jpype1>=1.5.0

requirements/environment_mac.yml

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -5,37 +5,37 @@ channels:
55
- pytorch
66

77
dependencies:
8-
- python<=3.10
8+
- python>=3.10
99
- pip==23.3.2
10-
- numpy==1.23.5
10+
- numpy>=1.26.4,<2
1111
- python-javabridge==4.0.3
12-
- scipy<=1.11.4
12+
- scipy>=1.12,<2
1313
- scikit-image<=0.22.0
14-
- matplotlib<=3.8.2
14+
- matplotlib>=3.8.0
1515
- openjdk<=18.0.0
1616
- h5py==3.10.0
1717
- dask<=2023.12.1
18-
- pydicom==2.4.4
18+
- pydicom==3.0.2
1919
- pytest==7.4.3
2020
- pre-commit<=3.6.0
21-
- coverage==7.2.7
21+
- coverage==7.4.0
2222
- networkx<=3.2.1
2323
- pip:
2424
# - coverage==7.2.7
2525
- numba>=0.59
2626
# - setuptools==58.2.0
2727
# - numpy==1.23.5
2828
- torch==2.8.0
29-
- python-bioformats==4.0.7
29+
- python-bioformats==4.1.0
3030
# - python-javabridge==4.0.3
3131
- protobuf==3.20.3
3232
- onnx==1.17.0
33-
- onnxruntime==1.16.3
33+
- onnxruntime>=1.17.0,<1.18
3434
- opencv-contrib-python==4.8.1.78
3535
- scanpy==1.9.6
36-
- anndata<=0.10.3
36+
- anndata>=0.7.6,<=0.10.3
3737
- tqdm==4.66.3
3838
- loguru==0.7.2
3939
- pandas<=2.1.4
4040
- torch-geometric==2.3.1
41-
- jpype1==1.4.1
41+
- jpype1>=1.5.0

requirements/environment_test.yml

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -5,36 +5,36 @@ channels:
55
- pytorch
66

77
dependencies:
8-
- python<=3.10
8+
- python>=3.10
99
- pip==25.0.1
10-
- numpy==1.23.5
11-
- scipy<=1.11.4
10+
- numpy>=1.26.4,<2
11+
- scipy>=1.12,<2
1212
- scikit-image<=0.22.0
13-
- matplotlib<=3.8.2
13+
- matplotlib>=3.8.0
1414
- openjdk<=18.0.0
1515
# - pytorch==2.8.0
1616
- h5py==3.10.0
1717
- dask<=2023.12.1
18-
- pydicom==2.4.4
18+
- pydicom==3.0.2
1919
- pytest==7.4.3
2020
- pre-commit<=3.6.0
21-
- coverage==7.2.7
21+
- coverage==7.4.0
2222
- networkx<=3.2.1
2323
- pip:
2424
- -r ../requirements/requirements_torch.txt
2525
# - coverage==7.2.7
2626
- numba>=0.59
27-
- python-bioformats==4.0.7
28-
- python-javabridge==4.0.3
27+
- python-bioformats==4.1.0
28+
- python-javabridge==4.0.4
2929
- protobuf==3.20.3
3030
- onnx==1.17.0
31-
- onnxruntime==1.16.3
31+
- onnxruntime>=1.17.0,<1.18
3232
- opencv-contrib-python==4.8.1.78
3333
- openslide-python==1.3.1
3434
- scanpy==1.9.6
35-
- anndata<=0.10.3
35+
- anndata>=0.7.6,<=0.10.3
3636
- tqdm==4.66.3
3737
- loguru==0.7.2
3838
- pandas<=2.1.4
3939
- torch-geometric==2.3.1
40-
- jpype1==1.4.1
40+
- jpype1>=1.5.0

0 commit comments

Comments
 (0)