bowang-lab/U-Mamba

changing nnUNet base directories

idinsmore1 opened this issue · 2 comments

Hello! Thanks for putting this tool together. I just wanted to bring up a bug that I noticed while testing this repo. I've used nnUNet before, so I placed my data in a different location than U-Mamba/data and changed the default nnUNet_raw/preprocessed/results directories using bash's export command. However, your custom script doesn't reflect those changes when you run any of the nnUNet commands, it still points nnUNet_raw to U-Mamba/data/nnUNet_raw (same with preprocessed and results). Just wanted to bring this to attention if other experienced nnUNet users try this out. Great work on the paper and model!

Hi,
Thank you for your interest in trying out U-Mamba! The paths to directories of data in U-Mamba are indeed preset to the codebase's data directory U-Mamba/data. This is for preventing conflicts with environment variables set for pre-existing nnUNet instances. However, feel free to customize these paths to fit your setup by modifying the directory paths in umamba/nnunetv2/path.py according to your preferred nnUNet data directories, as in

base = join(os.sep.join(__file__.split(os.sep)[:-3]), 'data')
# or you can set your own path, e.g., base = '/home/user_name/Documents/U-Mamba/data'
nnUNet_raw = join(base, 'nnUNet_raw') # os.environ.get('nnUNet_raw')
nnUNet_preprocessed = join(base, 'nnUNet_preprocessed') # os.environ.get('nnUNet_preprocessed')
nnUNet_results = join(base, 'nnUNet_results') # os.environ.get('nnUNet_results')

We hope this addresses your concern.

We also add a remark on readme. Thanks for pointing out this:)