nnUNet
nnUNet copied to clipboard
command "nnUNet_download_pretrained_model TaskXXX_Y" is forcing tempfile being in user's home.
Hello,
first of all amazing repo and model structure, and tutorials as well. I was trying the 2d model inference on the Medical Segmentation Decathlon dataset (in particular Task009_Spleen) by running nnUNet_download_pretrained_model Task009_Spleen
.
I'd like to be as complete as possible, so here you have some info about my setup:
- private remote ( /homes/user ) , around 5GB of capacity
- shared remote for experiments (/data/user), 1TB of capacity. They shared the same parent folder. However, once calling the aforementioned command, the download breaks because there's no more space left in the user's home disk. IMPORTANT: I do not have sudo powers on /data, I can sudo on /homes and its bashrc only and I have ONLY these machines to work with.
At first I thought I wrongly exported the environments paths in /homes instead of /data, but this wasn't the case, having those set up in the correct way as you suggest in your tutorial.
So I climbed up a little bit in the error log and I noticed that in the file /nnunet/inference/pretrained_models/download_pretrained_model.py", in line 278 there's the following code snippet:
home = os.path.expanduser('~')
And in my case it seems calling my default /home path, filling it totally.
I was wondering if you can pass a custom argument when downloading the pretrained model to set the home for tempfile, and do not running automatically.
Thanks to whoever can have the patience and the availbility in answering this issue. Best, V
Hi @SanBast, I assume that you are working with nnU-Net v1. Yes, it is true that nnU-Net downloads pretrained models in a temporary folder which is located in the home directory and then moves it in the results folder.
Currently, there is no flag by which the temporary can be changed. However, we might add this. I will corresond with Fabian regarding this change. Alternatively, as a workaround, you could download the file locally on your own machine and rsync it to the cluster.
Best regards,
Carsten
Hi @sten2lu , firstly I'd like to thank you for the prompt answer, appreciate it!
Yes, I'm working with nnUnet-v1 because of the lack of pretrained models in nnUnet-v2 (curious to see the v2 performances on my samples asap, tho!).
Thanks for considering this flag's add. In the meantime I forced locally the temporary to my desired path, and it works as expected.
Please do not hesitate to inform me about (whether or not) you will add this change :)
Best, V
Hi @SanBast,
as we are currently running at full capacity, all of our efforts are directed towards nnUNetv2. Therefore we will not implement this. However, feel free to add a pull request with this feature.
Best regards,
Carsten