MIC-DKFZ / nnUNet

Apache License 2.0
5.56k stars 1.7k forks source link

Could not find requested nnunet trainer nnUNetTrainerUMambaBot in nnunetv2.training.nnUNetTrainer (/nnUNet/nnunetv2/training/nnUNetTrainer). If it is located somewhere else, please move it there. #2345

Closed lxy51 closed 1 month ago

lxy51 commented 2 months ago

(umamba) root@dade23778a8f:~/data1/U-Mamba# ./train.sh

############################ INFO: You are using the old nnU-Net default plans. We have updated our recommendations. Please consider using those instead! Read more here: https://github.com/MIC-DKFZ/nnUNet/blob/master/documentation/resenc_presets.md ############################

Traceback (most recent call last): File "/root/data1/lxy/envs/umamba/bin/nnUNetv2_train", line 8, in sys.exit(run_training_entry()) File "/nnUNet/nnunetv2/run/run_training.py", line 275, in run_training_entry run_training(args.dataset_name_or_id, args.configuration, args.fold, args.tr, args.p, args.pretrained_weights, File "/nnUNet/nnunetv2/run/run_training.py", line 196, in run_training nnunet_trainer = get_trainer_from_args(dataset_name_or_id, configuration, fold, trainer_class_name, File "/nnUNet/nnunetv2/run/run_training.py", line 43, in get_trainer_from_args raise RuntimeError(f'Could not find requested nnunet trainer {trainer_name} in ' RuntimeError: Could not find requested nnunet trainer nnUNetTrainerUMambaBot in nnunetv2.training.nnUNetTrainer (/nnUNet/nnunetv2/training/nnUNetTrainer). If it is located somewhere else, please move it there.

rabiaedayilmaz commented 1 month ago

same issue :)

FabianIsensee commented 1 month ago

Yeah that's because this trainer does not exist in our repo. If you want to use it, please use https://github.com/bowang-lab/U-Mamba

rabiaedayilmaz commented 1 month ago

Right, solved using:

%%capture

!pip install torch==2.0.1 torchvision==0.15.2 --index-url https://download.pytorch.org/whl/cu118
!pip install nnunetv2
!pip install causal-conv1d>=1.2.0
!pip install mamba-ssm --no-cache-dir
!git clone https://github.com/bowang-lab/U-Mamba
%cd U-Mamba/umamba
!pip install -e .
import torch
import mamba_ssm