add possibility for external nnUNet trainers
Hey, I would also be interested for something similar. I would like to add image readers/writers for specific data, or add custom preprocessors. I know how to add and use them within the nnUNet framework but they are too specific to be added to this repository, and I don't want to have to update a fork that could have diverged from the main repository. Could we add a mechanism to extend all at once? Maybe we could use a configuration file that is by default missing/empty and defining paths to custom classes to load. For instance something like that:
{
"MyCustomTrainer": "/path/to/my_custom_trainer.py",
"MyCustomIO": "/path/to/my_custom_io.py"
}
In the recursive_find_python_class function, we can give the config file and if the class name is in the config, we try to import it from the specified path and explicit the error if needed. What do you think? Would it be good for your use case too @sten2lu?
I can move this to the issues if you want or propose changes to this PR, just let me know.
Best,
Fabien