From 1b4f40c8655fa593a95dd6d9f60bfb7ce07ca42b Mon Sep 17 00:00:00 2001 From: Yun Liu Date: Sun, 15 Feb 2026 20:41:36 +0800 Subject: [PATCH 1/3] fix flake8 Signed-off-by: Yun Liu --- monai/networks/blocks/patchembedding.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/monai/networks/blocks/patchembedding.py b/monai/networks/blocks/patchembedding.py index 2a05ef964c..a4caae68be 100644 --- a/monai/networks/blocks/patchembedding.py +++ b/monai/networks/blocks/patchembedding.py @@ -101,7 +101,7 @@ def __init__( chars = (("h", "p1"), ("w", "p2"), ("d", "p3"))[:spatial_dims] from_chars = "b c " + " ".join(f"({k} {v})" for k, v in chars) to_chars = f"b ({' '.join([c[0] for c in chars])}) ({' '.join([c[1] for c in chars])} c)" - axes_len = {f"p{i+1}": p for i, p in enumerate(patch_size)} + axes_len = {f"p{i + 1}": p for i, p in enumerate(patch_size)} self.patch_embeddings = nn.Sequential( Rearrange(f"{from_chars} -> {to_chars}", **axes_len), nn.Linear(self.patch_dim, hidden_size) ) From 77383f6aa4ddedf176b8ff220255b7c482e86d42 Mon Sep 17 00:00:00 2001 From: Yun Liu Date: Sun, 15 Feb 2026 21:50:31 +0800 Subject: [PATCH 2/3] fix ci Signed-off-by: Yun Liu --- monai/data/box_utils.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/monai/data/box_utils.py b/monai/data/box_utils.py index b09b86b605..89d4d399f7 100644 --- a/monai/data/box_utils.py +++ b/monai/data/box_utils.py @@ -1128,7 +1128,8 @@ def non_max_suppression( scores_t, *_ = convert_to_dst_type(scores, boxes_t) # sort boxes in descending order according to the scores - sort_idxs = torch.argsort(scores_t, dim=0, descending=True) + # use stable=True to ensure deterministic ordering when scores are equal + sort_idxs = torch.argsort(scores_t, dim=0, descending=True, stable=True) boxes_sort = deepcopy(boxes_t)[sort_idxs, :] # initialize the list of picked indexes From c20a61e6db75f24410dec25cf28917ddf1bce20a Mon Sep 17 00:00:00 2001 From: Yun Liu Date: Sun, 15 Feb 2026 22:00:21 +0800 Subject: [PATCH 3/3] fix ci Signed-off-by: Yun Liu --- runtests.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/runtests.sh b/runtests.sh index 849daf9fe1..294f8a4872 100755 --- a/runtests.sh +++ b/runtests.sh @@ -136,7 +136,7 @@ function print_version { function install_deps { echo "Pip installing MONAI development dependencies and compile MONAI cpp extensions..." - ${cmdPrefix}"${PY_EXE}" -m pip install -r requirements-dev.txt + ${cmdPrefix}"${PY_EXE}" -m pip install --no-build-isolation -r requirements-dev.txt } function compile_cpp {