|
35 | 35 | Example script to execute this program, only need to run on the master node:
|
36 | 36 | `horovodrun -np 16 -H server1:4,server2:4,server3:4,server4:4 python unet_evaluation_horovod.py -d "./testdata"`
|
37 | 37 |
|
38 |
| - This example was tested with [Ubuntu 16.04/20.04], [NCCL 2.6.3], [horovod 0.19.5]. |
| 38 | + This example was tested with [Ubuntu 16.04/20.04], [NCCL 2.6.3], [horovod 0.25.0]. |
39 | 39 |
|
40 | 40 | Referring to: https://github.com/horovod/horovod/blob/master/examples/pytorch_mnist.py
|
41 | 41 |
|
|
56 | 56 | from monai.data import DataLoader, Dataset, create_test_image_3d, decollate_batch
|
57 | 57 | from monai.inferers import sliding_window_inference
|
58 | 58 | from monai.metrics import DiceMetric
|
59 |
| -from monai.transforms import Activations, AsChannelFirstd, AsDiscrete, Compose, LoadImaged, ScaleIntensityd, EnsureTyped, EnsureType |
| 59 | +from monai.transforms import Activations, AsChannelFirstd, AsDiscrete, Compose, LoadImaged, ScaleIntensityd, EnsureType |
60 | 60 |
|
61 | 61 |
|
62 | 62 | def evaluate(args):
|
@@ -88,7 +88,6 @@ def evaluate(args):
|
88 | 88 | LoadImaged(keys=["img", "seg"]),
|
89 | 89 | AsChannelFirstd(keys=["img", "seg"], channel_dim=-1),
|
90 | 90 | ScaleIntensityd(keys="img"),
|
91 |
| - EnsureTyped(keys=["img", "seg"]), |
92 | 91 | ]
|
93 | 92 | )
|
94 | 93 |
|
@@ -156,7 +155,7 @@ def main():
|
156 | 155 | evaluate(args=args)
|
157 | 156 |
|
158 | 157 |
|
159 |
| -# Example script to execute this program only on the master node: |
| 158 | +# Example script to execute this program on 4 nodes (only need to run below command on the master node): |
160 | 159 | # horovodrun -np 16 -H server1:4,server2:4,server3:4,server4:4 python unet_evaluation_horovod.py -d "./testdata"
|
161 | 160 | if __name__ == "__main__":
|
162 | 161 | main()
|
0 commit comments