From 7ce29a1e2495d88c591b66a1324997fa2329ad34 Mon Sep 17 00:00:00 2001 From: Mohammad Amanour Rahman Date: Mon, 22 Dec 2025 23:10:50 +0600 Subject: [PATCH 01/16] Fix network_type docstring formatting in PerceptualLoss --- monai/losses/perceptual.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/monai/losses/perceptual.py b/monai/losses/perceptual.py index 2ae03bc8dc..3c9e22c36a 100644 --- a/monai/losses/perceptual.py +++ b/monai/losses/perceptual.py @@ -49,9 +49,11 @@ class PerceptualLoss(nn.Module): Args: spatial_dims: number of spatial dimensions. - network_type: {``"alex"``, ``"vgg"``, ``"squeeze"``, ``"radimagenet_resnet50"``, - ``"medicalnet_resnet10_23datasets"``, ``"medicalnet_resnet50_23datasets"``, ``"resnet50"``} - Specifies the network architecture to use. Defaults to ``"alex"``. + network_type: str or PercetualNetworkType Specifies the network architecture to use. Supported values are defined in + ``PercetualNetworkType`` (e.g., ``"alex"``, ``"vgg"``, ``"squeeze"``, + ``"radimagenet_resnet50"``, ``"medicalnet_resnet10_23datasets"``, + ``"medicalnet_resnet50_23datasets"``, ``"resnet50"``). + Defaults to ``PercetualNetworkType.alex``. is_fake_3d: if True use 2.5D approach for a 3D perceptual loss. fake_3d_ratio: ratio of how many slices per axis are used in the 2.5D approach. cache_dir: path to cache directory to save the pretrained network weights. From e2d0a027280c5faa5cbae3e290bae3994acdceed Mon Sep 17 00:00:00 2001 From: Mohammad Amanour Rahman Date: Mon, 22 Dec 2025 23:33:53 +0600 Subject: [PATCH 02/16] DCO Remediation Commit for Mohammad Amanour Rahman I, Mohammad Amanour Rahman , hereby add my Signed-off-by to this commit. Signed-off-by: Mohammad Amanour Rahman --- monai/losses/perceptual.py | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/monai/losses/perceptual.py b/monai/losses/perceptual.py index 3c9e22c36a..219f35c7dd 100644 --- a/monai/losses/perceptual.py +++ b/monai/losses/perceptual.py @@ -23,7 +23,7 @@ torchvision, _ = optional_import("torchvision") -class PercetualNetworkType(StrEnum): +class PerceptualNetworkType(StrEnum): alex = "alex" vgg = "vgg" squeeze = "squeeze" @@ -49,11 +49,15 @@ class PerceptualLoss(nn.Module): Args: spatial_dims: number of spatial dimensions. - network_type: str or PercetualNetworkType Specifies the network architecture to use. Supported values are defined in - ``PercetualNetworkType`` (e.g., ``"alex"``, ``"vgg"``, ``"squeeze"``, - ``"radimagenet_resnet50"``, ``"medicalnet_resnet10_23datasets"``, - ``"medicalnet_resnet50_23datasets"``, ``"resnet50"``). - Defaults to ``PercetualNetworkType.alex``. + network_type : str + One of: + - "alex" + - "vgg" + - "squeeze" + - "radimagenet_resnet50" + - "medicalnet_resnet10_23datasets" + - "medicalnet_resnet50_23datasets" + - "resnet50" is_fake_3d: if True use 2.5D approach for a 3D perceptual loss. fake_3d_ratio: ratio of how many slices per axis are used in the 2.5D approach. cache_dir: path to cache directory to save the pretrained network weights. From 96ea131fc422a69946f02deedc6a48f60f08e351 Mon Sep 17 00:00:00 2001 From: Mohammad Amanour Rahman Date: Mon, 22 Dec 2025 23:35:40 +0600 Subject: [PATCH 03/16] DCO Remediation Commit for Mohammad Amanour Rahman I, Mohammad Amanour Rahman , hereby add my Signed-off-by to this commit. Signed-off-by: Mohammad Amanour Rahman From cc0c951f1643f0bc280d7815dabf5710a5976e85 Mon Sep 17 00:00:00 2001 From: Mohammad Amanour Rahman Date: Tue, 23 Dec 2025 00:04:10 +0600 Subject: [PATCH 04/16] Fix PerceptualLoss enum references and docstrings --- monai/losses/perceptual.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/monai/losses/perceptual.py b/monai/losses/perceptual.py index 219f35c7dd..37d6cd692d 100644 --- a/monai/losses/perceptual.py +++ b/monai/losses/perceptual.py @@ -76,7 +76,7 @@ class PerceptualLoss(nn.Module): def __init__( self, spatial_dims: int, - network_type: str = PercetualNetworkType.alex, + network_type: str = PerceptualNetworkType.alex, is_fake_3d: bool = True, fake_3d_ratio: float = 0.5, cache_dir: str | None = None, @@ -99,10 +99,10 @@ def __init__( if channel_wise and "medicalnet_" not in network_type: raise ValueError("Channel-wise loss is only compatible with MedicalNet networks.") - if network_type.lower() not in list(PercetualNetworkType): + if network_type.lower() not in list(PerceptualNetworkType): raise ValueError( "Unrecognised criterion entered for Adversarial Loss. Must be one in: %s" - % ", ".join(PercetualNetworkType) + % ", ".join(PerceptualNetworkType) ) if cache_dir: From eeef172992ebfbd686da151c427c1c81cc83738d Mon Sep 17 00:00:00 2001 From: Mohammad Amanour Rahman Date: Tue, 23 Dec 2025 00:06:13 +0600 Subject: [PATCH 05/16] DCO Remediation Commit for Mohammad Amanour Rahman I, Mohammad Amanour Rahman , hereby add my Signed-off-by to this commit: 7ce29a1 Signed-off-by: Mohammad Amanour Rahman From 84e7d7041cc12e92e8c96e6e46252833ddb51b15 Mon Sep 17 00:00:00 2001 From: Mohammad Amanour Rahman Date: Tue, 23 Dec 2025 00:06:17 +0600 Subject: [PATCH 06/16] DCO Remediation Commit for Mohammad Amanour Rahman I, Mohammad Amanour Rahman , hereby add my Signed-off-by to this commit: cc0c951 Signed-off-by: Mohammad Amanour Rahman From 3e92d74ebb810801218974427ea355b7d792e65e Mon Sep 17 00:00:00 2001 From: Mohammad Amanour Rahman Date: Tue, 23 Dec 2025 00:07:53 +0600 Subject: [PATCH 07/16] Fix PerceptualLoss enum references and docstrings --- monai/losses/perceptual.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/monai/losses/perceptual.py b/monai/losses/perceptual.py index 37d6cd692d..dca3ec30e2 100644 --- a/monai/losses/perceptual.py +++ b/monai/losses/perceptual.py @@ -49,7 +49,7 @@ class PerceptualLoss(nn.Module): Args: spatial_dims: number of spatial dimensions. - network_type : str + network_type: str | PercetualNetworkType = PercetualNetworkType.alex, One of: - "alex" - "vgg" From ea64afaf17698c1ae19b74d37b57edd0ae976a33 Mon Sep 17 00:00:00 2001 From: Mohammad Amanour Rahman Date: Tue, 23 Dec 2025 00:16:53 +0600 Subject: [PATCH 08/16] DCO Remediation Commit for Mohammad Amanour Rahman I, Mohammad Amanour Rahman , hereby add my Signed-off-by to this commit: 7ce29a1 Signed-off-by: Mohammad Amanour Rahman From 0c667a99a85c02a320ad0a90c87d94b813904f27 Mon Sep 17 00:00:00 2001 From: Mohammad Amanour Rahman Date: Tue, 23 Dec 2025 00:17:00 +0600 Subject: [PATCH 09/16] DCO Remediation Commit for Mohammad Amanour Rahman I, Mohammad Amanour Rahman , hereby add my Signed-off-by to this commit: cc0c951 Signed-off-by: Mohammad Amanour Rahman From ccea8930bf824549f0b09695648b345a662e5f1a Mon Sep 17 00:00:00 2001 From: Mohammad Amanour Rahman Date: Tue, 23 Dec 2025 00:17:04 +0600 Subject: [PATCH 10/16] DCO Remediation Commit for Mohammad Amanour Rahman I, Mohammad Amanour Rahman , hereby add my Signed-off-by to this commit: 3e92d74 Signed-off-by: Mohammad Amanour Rahman From 8be3faac7306e56f36d03bdb44398ebfa21ed89a Mon Sep 17 00:00:00 2001 From: Mohammad Amanour Rahman Date: Mon, 22 Dec 2025 23:10:50 +0600 Subject: [PATCH 11/16] Fix network_type docstring formatting in PerceptualLoss Signed-off-by: Mohammad Amanour Rahman --- e --abort | 114 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 114 insertions(+) create mode 100644 e --abort diff --git a/e --abort b/e --abort new file mode 100644 index 0000000000..08c6a46e26 --- /dev/null +++ b/e --abort @@ -0,0 +1,114 @@ +bc38c962 (HEAD -> dev) Fix PerceptualLoss enum references and docstrings +be2869df Fix network_type docstring formatting in PerceptualLoss +ccea8930 (origin/dev, origin/HEAD) DCO Remediation Commit for Mohammad Amanour Rahman +0c667a99 DCO Remediation Commit for Mohammad Amanour Rahman +ea64afaf DCO Remediation Commit for Mohammad Amanour Rahman +3e92d74e Fix PerceptualLoss enum references and docstrings +84e7d704 DCO Remediation Commit for Mohammad Amanour Rahman +eeef1729 DCO Remediation Commit for Mohammad Amanour Rahman +cc0c951f Fix PerceptualLoss enum references and docstrings +96ea131f DCO Remediation Commit for Mohammad Amanour Rahman +e2d0a027 DCO Remediation Commit for Mohammad Amanour Rahman +7ce29a1e Fix network_type docstring formatting in PerceptualLoss +15fd428c Bump actions/checkout from 4 to 6 (#8649) +e5417c86 Bump al-cheb/configure-pagefile-action from 1.4 to 1.5 (#8648) +c1d02cf1 Bump peter-evans/slash-command-dispatch from 4.0.0 to 5.0.0 (#8650) +e2677053 Added an optional_import check for onnxruntime and applied the @unitt… (#8641) +04a89ee9 Generate heatmap transforms (#8579) +f493ecdd 8620 modulenotfounderror no module named onnxscript in test py3x 311 pipeline (#8638) +9a456274 Fix #8350: Clarify LocalNormalizedCrossCorrelationLoss docstring (#8639) +865b0e70 Update documentation links (#8637) +c968907c Fix #8599: Add track_meta and weights_only arguments to PersistentDataset for MetaTensor support. (#8628) +806c0e84 Fix index using tuple for image cropping operation (#8633) +23c271ea feat: add activation checkpointing to unet (#8554) +16e469c8 Correct H&E stain ordering heuristic in ExtractHEStains (#8551) +a8a7e575 timestep scheduling with np.linspace (#8623) +f315bcb0 8620 ModuleNotFoundError: No module named \'onnxscript\' in test-py3x (3.11) pipeline (#8621) +e72145ce Fix box_iou returning 0 for floating-point results less than 1. #8369 (#8553) +579cec52 added ReduceTrait and FlattenSequence (#8531) +d260b785 Bump github/codeql-action from 3 to 4 (#8616) +b10410ce Bump actions/upload-artifact from 4 to 5 (#8615) +69444c13 Bump actions/download-artifact from 5 to 6 (#8614) +d9cfa3e6 Bump peter-evans/create-or-update-comment from 4 to 5 (#8612) +09ace633 Include more-itertools in build env (#8611) +42a99477 8564 fourier positional encoding (#8570) +69f3dd26 Bump actions/setup-python from 5 to 6 (#8589) +c4a1acc8 Bump actions/checkout from 4 to 5 (#8588) +8a2efcb0 Bump actions/download-artifact from 4 to 5 (#8590) +53382d83 Update citation for 1.5.1 (#8582) +9c6d819f Release 1.5.1 Updates (#8575) +9122739e Removing instantiation in forward (#8580) +cf5790db Fix gdown fails (#8576) +cf5505a5 Diffusion Model Encoder has an output layer set in forward method and this leads to problems (#8578) +6327a861 Transformers version (#8574) +946cfdff Path traversal issue security fix (#8568) +948fbb70 Torch and Pickle Safe Load Fixes (#8566) +401ea4a0 Fix hardcoded input dim in DiffusionModelEncoder (#8514) +fd13c1b5 Create SECURITY.md (#8546) +725c8dea Torchvision pretrain fix (#8563) +b5bc69d0 Classifier free guidance unconditioned value (#8562) +0968da20 Improve Orientation transform to use the "space" (LPS vs RAS) of a metatensor by default (#8473) +d4ba52e3 Fix build failure by pinning pyamg to versions below 5.3.0 (#8548) +cb200af0 Tests Cleanup (#8535) +1e6c6615 8525 improve documentation on the datalist format (#8539) +cf869814 fix: HistogramNormalized doc (#8543) +cafc1feb Pytorch 2.8 Support (#8530) +b92b2ce8 Add support for optional conditioning in PatchInferer, SliceInferer, and SlidingWindowInferer (#8400) +2a12c4b4 Add input validation to ImageStats class (#8501) +ede6ace8 Throw exception on invalid images in retinanet detector (#8515) +1dc0e68c 8185 test refactor 2 (#8405) +503b4ede fix bug in maisi vae (#8517) +8ee3f89b Updates for Pytorch 2.7 (#8429) +def42221 Adding .coderabbit.yaml File (#8513) +e0be5d27 Update README badges to add research paper citations number (#8494) +e499362b add kwargs in array and functional file (#8508) +4b69748a ci: add custom timeout to ci job in order to save resources (#8504) +d388d1c6 Update citation (#8484) +3d6021a6 Fix: ZarrAvgMerger ValueError with zarr_format 3 (#8477) +d38c93f9 Removed or Replaced Broken URLs (#8483) +e5c512ff Fix integration test in 24.10 (#8480) +423ea748 Fixing URLs in README.md (#8481) +dfe6fc77 Changelog For 1.5 (#8474) +c3a317d2 Adding CODEOWNERS (#8457) +c3a3397d Remove unused test cases in bundle load (#8463) +2d416557 Classifier free guidance (#8460) +f85135b0 Remove deprecated `net_name` in test file (#8461) +d4b4bff9 Adding Support Policy + Doc Updates (#8458) +222d5094 Migrate to modern Python Logger API (#8449) +bf6bc1fd Enable code coverage comments on PRs in codecov configuration (#8402) +707b2305 Remove deprecated `return_state_dict ` in bundle `load` (#8454) +03a0d851 Fix AutoencoderKL docstrings. (#8445) +daf9f054 Update default overlap value in occlusion_sensitivity to 0.6 (#8446) +f97a0e9b Remove deprecated functionality for v1.5 (#8430) +4305bb81 :bug: fix cosine noise scheduler (#8427) +0d19a72f Temporarily Restrict setuptools Version to 79.0.1 (#8441) +b58e883c selfattention block: Remove the fc linear layer if it is not used (#8325) +f27517b8 Inverse Threading Fix (#8418) +8f3d8e87 Update get latest bundle version function (#8420) +eadffd24 Fix OptionalImportError: required package `openslide` is not installed (#8419) +9586071c Add Skip test in TestTranschex (#8416) +6c8de354 8394 Update bundle download API (#8403) +83dcd35c Fix: correctly apply fftshift to real-valued data inputs (#8407) +90ead4bf 8328 nnunet bundle integration (#8329) +4986d7ff Auto3DSeg algo_template hash update (#8406) +bfcb318b Restormer Implementation (#8312) +8aef9a98 Update Dice Metric Docs (#8388) +5c5ca232 Auto3DSeg algo_template hash update (#8397) +0f5da113 Auto3DSeg algo_template hash update (#8393) +41d6c9c2 8201 Fix DataFrame subsets indexing in CSVDataset() (#8351) +34f37973 add prediction type for rflow scheduler (#8386) +90de55b1 Add rectified flow noise scheduler for accelerated diffusion model (#8374) +7c26e5af Enable Pytorch 2.6 (#8309) +1983f277 Auto3DSeg algo_template hash update (#8378) +2e391c82 Bump torch minimum to mitigate CVE-2024-31580 & CVE-2024-31583 and enable numpy 2 compatibility (#8368) +a09c1f08 Update monaihosting download method (#8364) +ab075234 Modify ControlNet inferer so that it takes in context when the diffus… (#8360) +a7905909 8354 fix path at test onnx trt export (#8361) +d98f3481 Solves path problem in test_bundle_trt_export.py (#8357) +af54a17b Add Average Precision to metrics (#8089) +b0ed2534 Fix CommonKeys docstring (#8342) +fb8c5bf7 Removed outdated `torch` version checks from transform functions (#8359) +960c59b4 Fix `packaging` imports in version comparison logic (#8347) +0a85eed2 Inferer modification - save_intermediates clashes with latent shape adjustment in latent diffusion inferers (#8343) +44add8d1 Bump min torch to 1.13.1 to mitigate CVE-2022-45907 unsafe usage of eval (#8296) +e538f7fd Recursive Item Mapping for Nested Lists in Compose (#8187) From f563b898bf1ebf685c2a1d0ef0785affc6a698f0 Mon Sep 17 00:00:00 2001 From: Mohammad Amanour Rahman Date: Tue, 23 Dec 2025 00:04:10 +0600 Subject: [PATCH 12/16] WIP: temp commit before cherry-pick --- e --abort | 114 ------------------------------------------------------ 1 file changed, 114 deletions(-) delete mode 100644 e --abort diff --git a/e --abort b/e --abort deleted file mode 100644 index 08c6a46e26..0000000000 --- a/e --abort +++ /dev/null @@ -1,114 +0,0 @@ -bc38c962 (HEAD -> dev) Fix PerceptualLoss enum references and docstrings -be2869df Fix network_type docstring formatting in PerceptualLoss -ccea8930 (origin/dev, origin/HEAD) DCO Remediation Commit for Mohammad Amanour Rahman -0c667a99 DCO Remediation Commit for Mohammad Amanour Rahman -ea64afaf DCO Remediation Commit for Mohammad Amanour Rahman -3e92d74e Fix PerceptualLoss enum references and docstrings -84e7d704 DCO Remediation Commit for Mohammad Amanour Rahman -eeef1729 DCO Remediation Commit for Mohammad Amanour Rahman -cc0c951f Fix PerceptualLoss enum references and docstrings -96ea131f DCO Remediation Commit for Mohammad Amanour Rahman -e2d0a027 DCO Remediation Commit for Mohammad Amanour Rahman -7ce29a1e Fix network_type docstring formatting in PerceptualLoss -15fd428c Bump actions/checkout from 4 to 6 (#8649) -e5417c86 Bump al-cheb/configure-pagefile-action from 1.4 to 1.5 (#8648) -c1d02cf1 Bump peter-evans/slash-command-dispatch from 4.0.0 to 5.0.0 (#8650) -e2677053 Added an optional_import check for onnxruntime and applied the @unitt… (#8641) -04a89ee9 Generate heatmap transforms (#8579) -f493ecdd 8620 modulenotfounderror no module named onnxscript in test py3x 311 pipeline (#8638) -9a456274 Fix #8350: Clarify LocalNormalizedCrossCorrelationLoss docstring (#8639) -865b0e70 Update documentation links (#8637) -c968907c Fix #8599: Add track_meta and weights_only arguments to PersistentDataset for MetaTensor support. (#8628) -806c0e84 Fix index using tuple for image cropping operation (#8633) -23c271ea feat: add activation checkpointing to unet (#8554) -16e469c8 Correct H&E stain ordering heuristic in ExtractHEStains (#8551) -a8a7e575 timestep scheduling with np.linspace (#8623) -f315bcb0 8620 ModuleNotFoundError: No module named \'onnxscript\' in test-py3x (3.11) pipeline (#8621) -e72145ce Fix box_iou returning 0 for floating-point results less than 1. #8369 (#8553) -579cec52 added ReduceTrait and FlattenSequence (#8531) -d260b785 Bump github/codeql-action from 3 to 4 (#8616) -b10410ce Bump actions/upload-artifact from 4 to 5 (#8615) -69444c13 Bump actions/download-artifact from 5 to 6 (#8614) -d9cfa3e6 Bump peter-evans/create-or-update-comment from 4 to 5 (#8612) -09ace633 Include more-itertools in build env (#8611) -42a99477 8564 fourier positional encoding (#8570) -69f3dd26 Bump actions/setup-python from 5 to 6 (#8589) -c4a1acc8 Bump actions/checkout from 4 to 5 (#8588) -8a2efcb0 Bump actions/download-artifact from 4 to 5 (#8590) -53382d83 Update citation for 1.5.1 (#8582) -9c6d819f Release 1.5.1 Updates (#8575) -9122739e Removing instantiation in forward (#8580) -cf5790db Fix gdown fails (#8576) -cf5505a5 Diffusion Model Encoder has an output layer set in forward method and this leads to problems (#8578) -6327a861 Transformers version (#8574) -946cfdff Path traversal issue security fix (#8568) -948fbb70 Torch and Pickle Safe Load Fixes (#8566) -401ea4a0 Fix hardcoded input dim in DiffusionModelEncoder (#8514) -fd13c1b5 Create SECURITY.md (#8546) -725c8dea Torchvision pretrain fix (#8563) -b5bc69d0 Classifier free guidance unconditioned value (#8562) -0968da20 Improve Orientation transform to use the "space" (LPS vs RAS) of a metatensor by default (#8473) -d4ba52e3 Fix build failure by pinning pyamg to versions below 5.3.0 (#8548) -cb200af0 Tests Cleanup (#8535) -1e6c6615 8525 improve documentation on the datalist format (#8539) -cf869814 fix: HistogramNormalized doc (#8543) -cafc1feb Pytorch 2.8 Support (#8530) -b92b2ce8 Add support for optional conditioning in PatchInferer, SliceInferer, and SlidingWindowInferer (#8400) -2a12c4b4 Add input validation to ImageStats class (#8501) -ede6ace8 Throw exception on invalid images in retinanet detector (#8515) -1dc0e68c 8185 test refactor 2 (#8405) -503b4ede fix bug in maisi vae (#8517) -8ee3f89b Updates for Pytorch 2.7 (#8429) -def42221 Adding .coderabbit.yaml File (#8513) -e0be5d27 Update README badges to add research paper citations number (#8494) -e499362b add kwargs in array and functional file (#8508) -4b69748a ci: add custom timeout to ci job in order to save resources (#8504) -d388d1c6 Update citation (#8484) -3d6021a6 Fix: ZarrAvgMerger ValueError with zarr_format 3 (#8477) -d38c93f9 Removed or Replaced Broken URLs (#8483) -e5c512ff Fix integration test in 24.10 (#8480) -423ea748 Fixing URLs in README.md (#8481) -dfe6fc77 Changelog For 1.5 (#8474) -c3a317d2 Adding CODEOWNERS (#8457) -c3a3397d Remove unused test cases in bundle load (#8463) -2d416557 Classifier free guidance (#8460) -f85135b0 Remove deprecated `net_name` in test file (#8461) -d4b4bff9 Adding Support Policy + Doc Updates (#8458) -222d5094 Migrate to modern Python Logger API (#8449) -bf6bc1fd Enable code coverage comments on PRs in codecov configuration (#8402) -707b2305 Remove deprecated `return_state_dict ` in bundle `load` (#8454) -03a0d851 Fix AutoencoderKL docstrings. (#8445) -daf9f054 Update default overlap value in occlusion_sensitivity to 0.6 (#8446) -f97a0e9b Remove deprecated functionality for v1.5 (#8430) -4305bb81 :bug: fix cosine noise scheduler (#8427) -0d19a72f Temporarily Restrict setuptools Version to 79.0.1 (#8441) -b58e883c selfattention block: Remove the fc linear layer if it is not used (#8325) -f27517b8 Inverse Threading Fix (#8418) -8f3d8e87 Update get latest bundle version function (#8420) -eadffd24 Fix OptionalImportError: required package `openslide` is not installed (#8419) -9586071c Add Skip test in TestTranschex (#8416) -6c8de354 8394 Update bundle download API (#8403) -83dcd35c Fix: correctly apply fftshift to real-valued data inputs (#8407) -90ead4bf 8328 nnunet bundle integration (#8329) -4986d7ff Auto3DSeg algo_template hash update (#8406) -bfcb318b Restormer Implementation (#8312) -8aef9a98 Update Dice Metric Docs (#8388) -5c5ca232 Auto3DSeg algo_template hash update (#8397) -0f5da113 Auto3DSeg algo_template hash update (#8393) -41d6c9c2 8201 Fix DataFrame subsets indexing in CSVDataset() (#8351) -34f37973 add prediction type for rflow scheduler (#8386) -90de55b1 Add rectified flow noise scheduler for accelerated diffusion model (#8374) -7c26e5af Enable Pytorch 2.6 (#8309) -1983f277 Auto3DSeg algo_template hash update (#8378) -2e391c82 Bump torch minimum to mitigate CVE-2024-31580 & CVE-2024-31583 and enable numpy 2 compatibility (#8368) -a09c1f08 Update monaihosting download method (#8364) -ab075234 Modify ControlNet inferer so that it takes in context when the diffus… (#8360) -a7905909 8354 fix path at test onnx trt export (#8361) -d98f3481 Solves path problem in test_bundle_trt_export.py (#8357) -af54a17b Add Average Precision to metrics (#8089) -b0ed2534 Fix CommonKeys docstring (#8342) -fb8c5bf7 Removed outdated `torch` version checks from transform functions (#8359) -960c59b4 Fix `packaging` imports in version comparison logic (#8347) -0a85eed2 Inferer modification - save_intermediates clashes with latent shape adjustment in latent diffusion inferers (#8343) -44add8d1 Bump min torch to 1.13.1 to mitigate CVE-2022-45907 unsafe usage of eval (#8296) -e538f7fd Recursive Item Mapping for Nested Lists in Compose (#8187) From a234edf16fd2ee686d82ba849d70d9951145a54e Mon Sep 17 00:00:00 2001 From: Mohammad Amanour Rahman Date: Tue, 23 Dec 2025 02:04:38 +0600 Subject: [PATCH 13/16] Mohammad Amanour Rahman DCO Remediation Commit for Mohammad Amanour Rahman I, Mohammad Amanour Rahman , hereby add my Signed-off-by to the previous commits. From 2d423b8bb753d75e47087d472a2dd3f0699df030 Mon Sep 17 00:00:00 2001 From: Mohammad Amanour Rahman Date: Wed, 24 Dec 2025 01:12:21 +0600 Subject: [PATCH 14/16] feat: add installation hints for missing image writers #7980 --- monai/data/image_writer.py | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/monai/data/image_writer.py b/monai/data/image_writer.py index b9e8b9e68e..35684e1300 100644 --- a/monai/data/image_writer.py +++ b/monai/data/image_writer.py @@ -116,7 +116,26 @@ def resolve_writer(ext_name, error_if_not_found=True) -> Sequence: except Exception: # other writer init errors indicating it exists avail_writers.append(_writer) if not avail_writers and error_if_not_found: - raise OptionalImportError(f"No ImageWriter backend found for {fmt}.") + RECOMMENDED_PACKAGES = { + "png": "Pillow", + "jpg": "Pillow", + "jpeg": "Pillow", + "nii": "nibabel or SimpleITK", + "nii.gz": "nibabel or SimpleITK", + "nrrd": "pynrrd", + "tif": "Pillow or tifffile", + "tiff": "Pillow or tifffile", + } + + fmt_clean = fmt.replace(".", "").lower() + package_hint = RECOMMENDED_PACKAGES.get(fmt_clean, "") + + msg = f"No ImageWriter backend found for {fmt}." + if package_hint: + msg += f" Please install '{package_hint}' (e.g., pip install {package_hint})." + + raise OptionalImportError(msg) + writer_tuple = ensure_tuple(avail_writers) SUPPORTED_WRITERS[fmt] = writer_tuple return writer_tuple From 55b84300da029e219d4d0be0909fbce2bfa7c14b Mon Sep 17 00:00:00 2001 From: Mohammad Amanour Rahman Date: Wed, 24 Dec 2025 11:05:25 +0600 Subject: [PATCH 15/16] DCO Remediation Commit for Mohammad Amanour Rahman I, Mohammad Amanour Rahman , hereby add my Signed-off-by to this commit: 7ce29a1e2495d88c591b66a1324997fa2329ad34 I, Mohammad Amanour Rahman , hereby add my Signed-off-by to this commit: cc0c951f1643f0bc280d7815dabf5710a5976e85 I, Mohammad Amanour Rahman , hereby add my Signed-off-by to this commit: 3e92d74ebb810801218974427ea355b7d792e65e I, Mohammad Amanour Rahman , hereby add my Signed-off-by to this commit: f563b898bf1ebf685c2a1d0ef0785affc6a698f0 I, Mohammad Amanour Rahman , hereby add my Signed-off-by to this commit: a234edf16fd2ee686d82ba849d70d9951145a54e I, Mohammad Amanour Rahman , hereby add my Signed-off-by to this commit: 2d423b8bb753d75e47087d472a2dd3f0699df030 Signed-off-by: Mohammad Amanour Rahman --- monai/data/image_writer.py | 38 +++++++++++++++++++------------------- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/monai/data/image_writer.py b/monai/data/image_writer.py index 35684e1300..b941ce995d 100644 --- a/monai/data/image_writer.py +++ b/monai/data/image_writer.py @@ -115,26 +115,26 @@ def resolve_writer(ext_name, error_if_not_found=True) -> Sequence: continue except Exception: # other writer init errors indicating it exists avail_writers.append(_writer) - if not avail_writers and error_if_not_found: - RECOMMENDED_PACKAGES = { - "png": "Pillow", - "jpg": "Pillow", - "jpeg": "Pillow", - "nii": "nibabel or SimpleITK", - "nii.gz": "nibabel or SimpleITK", - "nrrd": "pynrrd", - "tif": "Pillow or tifffile", - "tiff": "Pillow or tifffile", - } - - fmt_clean = fmt.replace(".", "").lower() - package_hint = RECOMMENDED_PACKAGES.get(fmt_clean, "") - - msg = f"No ImageWriter backend found for {fmt}." - if package_hint: - msg += f" Please install '{package_hint}' (e.g., pip install {package_hint})." + if not avail_writers and error_if_not_found: + recommended_packages = { + "png": "Pillow", + "jpg": "Pillow", + "jpeg": "Pillow", + "nii": "nibabel or SimpleITK", + "nii.gz": "nibabel or SimpleITK", + "nrrd": "pynrrd", + "tif": "Pillow or tifffile", + "tiff": "Pillow or tifffile", + } + + fmt_clean = fmt.replace(".", "").lower() + package_hint = recommended_packages.get(fmt_clean, "") + + msg = f"No ImageWriter backend found for {fmt}." + if package_hint: + msg += f" Please install '{package_hint}' (e.g., pip install {package_hint})." - raise OptionalImportError(msg) + raise OptionalImportError(msg) writer_tuple = ensure_tuple(avail_writers) SUPPORTED_WRITERS[fmt] = writer_tuple From efc37aa35ba321337e1b419360f195646724fc45 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Wed, 24 Dec 2025 05:07:11 +0000 Subject: [PATCH 16/16] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- monai/data/image_writer.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/monai/data/image_writer.py b/monai/data/image_writer.py index b941ce995d..ab9e12f90b 100644 --- a/monai/data/image_writer.py +++ b/monai/data/image_writer.py @@ -133,7 +133,7 @@ def resolve_writer(ext_name, error_if_not_found=True) -> Sequence: msg = f"No ImageWriter backend found for {fmt}." if package_hint: msg += f" Please install '{package_hint}' (e.g., pip install {package_hint})." - + raise OptionalImportError(msg) writer_tuple = ensure_tuple(avail_writers)