OneTrainer icon indicating copy to clipboard operation
OneTrainer copied to clipboard

[Feat]: Automatically stop training if loss=NaN

Open Silvicultor opened this issue 1 year ago • 0 comments

Describe your use-case.

I noticed that OT will continue training even if NaNs are produced. Since I can’t think of any scenario in which anybody would want to continue training after NaN occurred, I suggest to stop it automatically.

What would you like to see as a solution?

  • Perform regularly a check if NaN is procured.
  • Preferably detect the NaN before it is applied to the weights which would destroy the model.
  • Create a backup before stopping and before applying NaN to the model weights.

Have you considered alternatives? List them here.

none

Silvicultor avatar Nov 18 '25 19:11 Silvicultor