MIC-DKFZ / nnUNet

Apache License 2.0
5.33k stars 1.63k forks source link

add optional arg to specify number of epochs #2283

Closed andylitalo closed 1 week ago

andylitalo commented 2 weeks ago

Adds an optional argument to allow user to specify the number of epochs to train. Useful when the number of epochs desired has not been specified in one of the available trainers. If not provided, uses default from the specified trainer.

FabianIsensee commented 1 week ago

Id like to keep this as it currently is because this will interfere with nnU-Net's saving infrastructure and cause reproducibility problems, also see https://github.com/MIC-DKFZ/nnUNet/pull/2154

andylitalo commented 1 week ago

Thanks for the response Fabian! And thanks for explaining the bug this change would introduce. My apologies for the replicate PR.

The trainers provided are helpful, but would it be possible to add one that trains for 500 epochs and another for 750? The gap between 250 and 1000 is large and sometimes includes the desired stopping time. I know developers can create such trainers on local forks, but sometimes it is convenient to install nnU-Net over PyPI instead of git (e.g., when installing on a docker image).

FabianIsensee commented 1 week ago

I see. I have added the requested trainers