It’s running on a computer running windows 10. A ‘twin’ of this computer runs the MONAIlabel server flawlessly, and even a laptop (without cuda possibilities) has managed to start the server. All of these instalations following the same procedure.
Yes, the file segmentation.py exists in the folder. I’ve just checked taking he segmentation.py from the laptop where the server worked, and replacing the one in the computer where it doesn’t work, and no success.
I’m quite a beginner with MONAILabel, so I don’t really have other ideas about the best way to troubleshoot. My thought was based on trying to interpret the error stack trace you shared. It looks like it was in the middle of loading a series of subclasses and successfully got through ones for deepedit, deepgrow_2d, deepgrow_3d, then ran into an error trying to load the same kind of thing for “segmentation”. It looks like the error message is suggesting that it is failing to find a segmentation.py file in lib/configs/ which has a Segmentation class defined in it derived from TaskConfig. If that file is there, then I wonder if perhaps some other configuration is pointing it to a different place or if something was renamed. For example, might you have renamed one of the models in order to customize it? Or, did you clone the github repo at different times on the two different computers? Might the repo have changed in between? Those are the only ideas I have which might be helpful. @diazandr3s do you have any suggestions?
I tried installing, on a different computer, with a cuda capable GPU, following the same instructions. I launched the server using the same command and everything worked fine at the first time.
So I figured the error was related to the computer. I reinstalled windows 11 from scratch, and in that fresh installation, I tried to install again the monai label (installing git, anaconda, creating a new environment…).
Again I still get the same error. I don’t think it’s a path problem, because I haven’t had to set it on the other two different computers where I tried to do the installation.
Thanks, Nayra.
I did the same process a few days ago in windows 11 without using anaconda.
Install a Python 3.9 (important, not 3.10) from the Windows store.
Please try to install MONAILabel and its prerequisites [as outlined here]
(Installation — MONAI Label 0.7.0rc1 Documentation) using pip in the PowerShell as admin.
to install the latest version of ML.
Download ML apps and dataset as outlined in the documentation link above and run the start_server script line.
Hope that helps …
Following your advice I installed python 3.9 from the Microsoft Store, followed the instructions from the monai.io page, installed the custom version of PyTorch+Cuda all of that using the PowerShell as admin.
To install the monail label, I cloned the github repository and, in the home directory, ran:
pip install -r requirements.txt
to get all the needed packages installed.
Downloaded the dataset and I was able to run the server and connect to it from Slicer!
I think what did the trick was not to use anaconda.