Closed BastienCagna closed 3 years ago
In which code is this statement ? I can't find it...
The training capsul process is in deepsulci.sulci_labeling.capsul.training
, and you normally instantiate it this way:
from capsul.api import capsul_engine
ce = capsul_engine()
training_process = ce.get_process_instance('deepsulci.sulci_labeling.capsul.training')
Ah, ok I though that we should directly import de class of the process. So you may reject the pull request I think.
For a process like this one, yes you can instantiate it directly (but here the class is inside another level of submodule, you could just add .taining
in your code). The ce.get_process_instance
is the general (and thus recommended) way to intantiate a process, and is useful especially if the process needs some configuration from the capsul engine. So it's a "good habit" to use it.
For PR #6 it's as you like, it's OK for me to accept it also.
Ok, it's better to use recommended habits. I will close de PR.
I need to use SulciDeepTraining capsul process but I can't.
Traceback (most recent call last): File [...], in
from deepsulci.sulci_labeling.capsul import SulciDeepTraining
ImportError: cannot import name 'SulciDeepTraining'