Skip to content

Commit df19315

Browse files
authored
4010 4016 fixes mmar integration tests (#4021)
* fixes unit test Signed-off-by: Wenqi Li <[email protected]> * temp tests Signed-off-by: Wenqi Li <[email protected]> * adds docker version tests Signed-off-by: Wenqi Li <[email protected]> * fixes #4016 Signed-off-by: Wenqi Li <[email protected]> * local tests Signed-off-by: Wenqi Li <[email protected]> * remove mmar cache daily Signed-off-by: Wenqi Li <[email protected]> * remove cache Signed-off-by: Wenqi Li <[email protected]> * Revert "temp tests" This reverts commit 238d883. Signed-off-by: Wenqi Li <[email protected]> * fixes typo Signed-off-by: Wenqi Li <[email protected]>
1 parent a676e38 commit df19315

File tree

6 files changed

+16
-14
lines changed

6 files changed

+16
-14
lines changed

.github/workflows/cron-mmar.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ jobs:
3232
key: ${{ runner.os }}-pip-${{ steps.pip-cache.outputs.datew }}
3333
- name: Install dependencies
3434
run: |
35+
rm -rf /github/home/.cache/torch/hub/mmars/
3536
python -m pip install --upgrade pip wheel
3637
python -m pip install -r requirements-dev.txt
3738
- name: Loading MMARs

.github/workflows/cron.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ jobs:
6262
if: github.repository == 'Project-MONAI/MONAI'
6363
strategy:
6464
matrix:
65-
container: ["pytorch:21.02", "pytorch:22.02"] # 21.02 for backward comp.
65+
container: ["pytorch:21.02", "pytorch:21.10", "pytorch:22.02"] # 21.02, 21.10 for backward comp.
6666
container:
6767
image: nvcr.io/nvidia/${{ matrix.container }}-py3 # testing with the latest pytorch base image
6868
options: "--gpus all"
@@ -106,7 +106,7 @@ jobs:
106106
if: github.repository == 'Project-MONAI/MONAI'
107107
strategy:
108108
matrix:
109-
container: ["pytorch:21.02", "pytorch:22.02"] # 21.02 for backward comp.
109+
container: ["pytorch:21.02", "pytorch:21.10", "pytorch:22.02"] # 21.02, 21.10 for backward comp.
110110
container:
111111
image: nvcr.io/nvidia/${{ matrix.container }}-py3 # testing with the latest pytorch base image
112112
options: "--gpus all"
@@ -204,7 +204,7 @@ jobs:
204204
if: github.repository == 'Project-MONAI/MONAI'
205205
needs: cron-gpu # so that monai itself is verified first
206206
container:
207-
image: nvcr.io/nvidia/pytorch:21.09-py3 # testing with the latest pytorch base image
207+
image: nvcr.io/nvidia/pytorch:22.02-py3 # testing with the latest pytorch base image
208208
options: "--gpus all --ipc=host"
209209
runs-on: [self-hosted, linux, x64, common]
210210
steps:

.github/workflows/integration.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ jobs:
3636
python -m pip uninstall -y torch torchvision
3737
python -m pip install torch==1.11.0+cu115 torchvision==0.12.0+cu115 -f https://download.pytorch.org/whl/torch_stable.html
3838
python -m pip install -r requirements-dev.txt
39+
rm -rf /github/home/.cache/torch/hub/mmars/
3940
- name: Run integration tests
4041
run: |
4142
python -m pip list

monai/engines/workflow.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -274,7 +274,7 @@ def run(self) -> None:
274274
"""
275275
if self.state.epoch_length == 0:
276276
warnings.warn(
277-
"`dataloader` is emply or the specified `epoch_length` is 0, skip the `run`."
277+
"`dataloader` is empty or the specified `epoch_length` is 0, skip the `run`."
278278
" if running distributed training, the program may hang in `all-gather`, `all-reduce`, etc."
279279
" because not all the ranks run the same computation logic."
280280
)

monai/networks/nets/dints.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -817,8 +817,8 @@ def get_topology_entropy(self, probs):
817817
probs: path activation probabilities
818818
"""
819819
if hasattr(self, "node2in"):
820-
node2in = self.node2in
821-
node2out = self.node2out
820+
node2in = self.node2in # pylint: disable=E0203
821+
node2out = self.node2out # pylint: disable=E0203
822822
else:
823823
# node activation index to feasible input child_idx
824824
node2in = [[] for _ in range(len(self.node_act_list))]

tests/test_mmar_download.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -94,16 +94,16 @@
9494
"item": "clara_pt_pathology_metastasis_detection",
9595
"map_location": "cuda" if torch.cuda.is_available() else "cpu",
9696
},
97-
"TorchVisionFullyConvModel",
97+
"TorchVisionFCModel",
9898
np.array(
9999
[
100-
[-0.00693138, -0.00441378, -0.01057985, 0.05604396, 0.03526996, -0.00399302, -0.0267504],
101-
[0.00805358, 0.01016939, -0.10749951, -0.28787708, -0.27905375, -0.13328083, -0.00882593],
102-
[-0.01909848, 0.04871106, 0.2957697, 0.60376877, 0.53552634, 0.24821444, 0.03773781],
103-
[0.02449462, -0.07471243, -0.30943492, -0.43987238, -0.26549947, -0.00698426, 0.04395606],
104-
[-0.03124012, 0.00807883, 0.06797771, -0.04612541, -0.30266526, -0.39722857, -0.25109962],
105-
[0.02480375, 0.03378576, 0.06519791, 0.24546203, 0.41867673, 0.393786, 0.16055048],
106-
[-0.01529332, -0.00062494, -0.016658, -0.06313603, -0.1508078, -0.09107386, -0.01239121],
100+
[-0.00540746, -0.00274996, -0.00837622, 0.05415914, 0.03555066, -0.00071636, -0.02325751],
101+
[0.00564625, 0.00674562, -0.1098334, -0.2936509, -0.28384757, -0.13580588, -0.00737865],
102+
[-0.02159783, 0.04615543, 0.29717407, 0.6001161, 0.53496915, 0.2528417, 0.04530451],
103+
[0.0225903, -0.07556137, -0.3070122, -0.43984795, -0.26286602, -0.00172576, 0.05003437],
104+
[-0.0320133, 0.00855468, 0.06824744, -0.04786247, -0.30358723, -0.3960023, -0.24895012],
105+
[0.02412516, 0.03411723, 0.06513759, 0.24332047, 0.41664436, 0.38999054, 0.15957521],
106+
[-0.01303542, -0.00166874, -0.01965466, -0.06620175, -0.15635538, -0.10023144, -0.01698002],
107107
]
108108
),
109109
),

0 commit comments

Comments
 (0)