diff --git a/PyTorch/Segmentation/nnUNet/benchmark.txt b/PyTorch/Segmentation/nnUNet/benchmark.txt index 5aa121aef8c9b1757449fdc9203706405f2660cd..9257eb6656cf478af225908f702085d51c93f2f5 100644 --- a/PyTorch/Segmentation/nnUNet/benchmark.txt +++ b/PyTorch/Segmentation/nnUNet/benchmark.txt @@ -24,6 +24,13 @@ apptainer exec --nv --pwd /workspace/nnunet_pyt $CONTAINER_DIR python scripts/be apptainer exec --nv --pwd /workspace/nnunet_pyt $CONTAINER_DIR python scripts/benchmark.py --mode predict --gpus 1 --dim 2 --batch_size 256 --amp -# Known issue -# ImportError: cannot import name 'get_num_classes' from 'torchmetrics.utilities.data' (/opt/conda/lib/python3.8/site-packages/torchmetrics/utilities/data.py) -https://github.com/NVIDIA/DeepLearningExamples/issues/1113 +# Known issue https://github.com/NVIDIA/DeepLearningExamples/issues/1113 +ImportError: cannot import name 'get_num_classes' from 'torchmetrics.utilities.data' (/opt/conda/lib/python3.8/site-packages/torchmetrics/utilities/data.py) + +Solution: pip install pytorch-lightning==1.5.10, another error raised when benchmarking predict: +Traceback (most recent call last): + File "main.py", line 110, in <module> + trainer.current_epoch = 1 +AttributeError: can't set attribute + +# 2023-09-28: Not working on the devel reservation \ No newline at end of file diff --git a/PyTorch/Segmentation/nnUNet/nnunet_for_pytorch_21.11.0.def b/PyTorch/Segmentation/nnUNet/nnunet_for_pytorch_21.11.0.def index ddb60ce6165ca12c9031bd40851a8d6da4a6bf0a..810c9c29622c17ded9e915146ab5c1e7d09f4767 100644 --- a/PyTorch/Segmentation/nnUNet/nnunet_for_pytorch_21.11.0.def +++ b/PyTorch/Segmentation/nnUNet/nnunet_for_pytorch_21.11.0.def @@ -16,12 +16,12 @@ cd /workspace/nnunet_pyt wget --content-disposition https://api.ngc.nvidia.com/v2/resources/nvidia/nnunet_for_pytorch/versions/$VERSION/zip -O nnunet_for_pytorch_$VERSION.zip unzip nnunet_for_pytorch_21.11.0.zip -sed 's/pytorch-lightning==1.3.8/pytorch-lightning==1.5.10/g' requirements.txt > temp_file && mv temp_file requirements.txt +#sed 's/pytorch-lightning==1.3.8/pytorch-lightning==1.5.10/g' requirements.txt > temp_file && mv temp_file requirements.txt pip install --disable-pip-version-check -r requirements.txt pip install monai==0.8.0 --no-dependencies pip uninstall -y torchtext # Fix for https://github.com/NVIDIA/DeepLearningExamples/issues/1113 -#pip install torchmetrics==0.6.0 +pip install torchmetrics==0.6.0 curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip" unzip -qq awscliv2.zip