Skip to content

Commit 98e7b68

Browse files
authored
Merge branch 'dev' into fix-6840
2 parents e6b289b + f97a0e9 commit 98e7b68

File tree

109 files changed

+3638
-796
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

109 files changed

+3638
-796
lines changed

.github/workflows/pythonapp-min.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ jobs:
124124
strategy:
125125
fail-fast: false
126126
matrix:
127-
pytorch-version: ['2.3.1', '2.4.1', '2.5.1', 'latest']
127+
pytorch-version: ['2.4.1', '2.5.1', '2.6.0'] # FIXME: add 'latest' back once PyTorch 2.7 issues are resolved
128128
timeout-minutes: 40
129129
steps:
130130
- uses: actions/checkout@v4

.github/workflows/pythonapp.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ jobs:
155155
# install the latest pytorch for testing
156156
# however, "pip install monai*.tar.gz" will build cpp/cuda with an isolated
157157
# fresh torch installation according to pyproject.toml
158-
python -m pip install torch>=2.3.0 torchvision
158+
python -m pip install torch>=2.4.1 torchvision
159159
- name: Check packages
160160
run: |
161161
pip uninstall monai

docs/requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
-f https://download.pytorch.org/whl/cpu/torch-2.3.0%2Bcpu-cp39-cp39-linux_x86_64.whl
2-
torch>=2.3.0
2+
torch>=2.4.1, <2.7.0
33
pytorch-ignite==0.4.11
44
numpy>=1.20
55
itk>=5.2

docs/source/apps.rst

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -277,3 +277,15 @@ FastMRIReader
277277

278278
.. autoclass:: monai.apps.nnunet.nnUNetV2Runner
279279
:members:
280+
281+
`nnUNet Bundle`
282+
---------------
283+
.. autoclass:: monai.apps.nnunet.ModelnnUNetWrapper
284+
:members:
285+
:special-members:
286+
287+
.. autofunction:: monai.apps.nnunet.get_nnunet_trainer
288+
.. autofunction:: monai.apps.nnunet.get_nnunet_monai_predictor
289+
.. autofunction:: monai.apps.nnunet.convert_nnunet_to_monai_bundle
290+
.. autofunction:: monai.apps.nnunet.convert_monai_bundle_to_nnunet
291+
.. autofunction:: monai.apps.nnunet.get_network_from_nnunet_plans

docs/source/bundle.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ Model Bundle
3434
:members:
3535
:special-members:
3636

37+
3738
`Scripts`
3839
---------
3940
.. autofunction:: ckpt_export

docs/source/metrics.rst

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,6 @@ Metrics
9898
`Hausdorff distance`
9999
--------------------
100100
.. autofunction:: compute_hausdorff_distance
101-
.. autofunction:: compute_percent_hausdorff_distance
102101

103102
.. autoclass:: HausdorffDistanceMetric
104103
:members:

docs/source/networks.rst

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,16 @@ Blocks
109109
.. autoclass:: SABlock
110110
:members:
111111

112+
`CABlock Block`
113+
~~~~~~~~~~~~~~~
114+
.. autoclass:: CABlock
115+
:members:
116+
117+
`FeedForward Block`
118+
~~~~~~~~~~~~~~~~~~~
119+
.. autoclass:: FeedForward
120+
:members:
121+
112122
`Squeeze-and-Excitation`
113123
~~~~~~~~~~~~~~~~~~~~~~~~
114124
.. autoclass:: ChannelSELayer
@@ -173,6 +183,16 @@ Blocks
173183
.. autoclass:: Subpixelupsample
174184
.. autoclass:: SubpixelUpSample
175185

186+
`Downsampling`
187+
~~~~~~~~~~~~~~
188+
.. autoclass:: DownSample
189+
:members:
190+
.. autoclass:: Downsample
191+
.. autoclass:: SubpixelDownsample
192+
:members:
193+
.. autoclass:: Subpixeldownsample
194+
.. autoclass:: SubpixelDownSample
195+
176196
`Registration Residual Conv Block`
177197
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
178198
.. autoclass:: RegistrationResidualConvBlock
@@ -625,6 +645,11 @@ Nets
625645
.. autoclass:: ViT
626646
:members:
627647

648+
`Restormer`
649+
~~~~~~~~~~~
650+
.. autoclass:: restormer
651+
:members:
652+
628653
`ViTAutoEnc`
629654
~~~~~~~~~~~~
630655
.. autoclass:: ViTAutoEnc
@@ -750,3 +775,38 @@ Utilities
750775

751776
.. automodule:: monai.apps.reconstruction.networks.nets.utils
752777
:members:
778+
779+
Noise Schedulers
780+
----------------
781+
.. automodule:: monai.networks.schedulers
782+
.. currentmodule:: monai.networks.schedulers
783+
784+
`Scheduler`
785+
~~~~~~~~~~~
786+
.. autoclass:: Scheduler
787+
:members:
788+
789+
`NoiseSchedules`
790+
~~~~~~~~~~~~~~~~
791+
.. autoclass:: NoiseSchedules
792+
:members:
793+
794+
`DDPMScheduler`
795+
~~~~~~~~~~~~~~~
796+
.. autoclass:: DDPMScheduler
797+
:members:
798+
799+
`DDIMScheduler`
800+
~~~~~~~~~~~~~~~
801+
.. autoclass:: DDIMScheduler
802+
:members:
803+
804+
`PNDMScheduler`
805+
~~~~~~~~~~~~~~~
806+
.. autoclass:: PNDMScheduler
807+
:members:
808+
809+
`RFlowScheduler`
810+
~~~~~~~~~~~~~~~~
811+
.. autoclass:: RFlowScheduler
812+
:members:

monai/apps/deepedit/interaction.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ def __call__(self, engine: SupervisedTrainer | SupervisedEvaluator, batchdata: d
7272

7373
with torch.no_grad():
7474
if engine.amp:
75-
with torch.cuda.amp.autocast():
75+
with torch.autocast("cuda"):
7676
predictions = engine.inferer(inputs, engine.network)
7777
else:
7878
predictions = engine.inferer(inputs, engine.network)

monai/apps/deepgrow/interaction.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ def __call__(self, engine: SupervisedTrainer | SupervisedEvaluator, batchdata: d
6767
engine.network.eval()
6868
with torch.no_grad():
6969
if engine.amp:
70-
with torch.cuda.amp.autocast():
70+
with torch.autocast("cuda"):
7171
predictions = engine.inferer(inputs, engine.network)
7272
else:
7373
predictions = engine.inferer(inputs, engine.network)

monai/apps/deepgrow/transforms.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -441,8 +441,8 @@ def __call__(self, data):
441441

442442
if np.all(np.less(current_size, self.spatial_size)):
443443
cropper = SpatialCrop(roi_center=center, roi_size=self.spatial_size)
444-
box_start = np.array([s.start for s in cropper.slices])
445-
box_end = np.array([s.stop for s in cropper.slices])
444+
box_start = [s.start for s in cropper.slices]
445+
box_end = [s.stop for s in cropper.slices]
446446
else:
447447
cropper = SpatialCrop(roi_start=box_start, roi_end=box_end)
448448

0 commit comments

Comments
 (0)