SMART-Lab / smartlearner

SMART-Learner is a machine learning library built with researchers in mind.
BSD 3-Clause "New" or "Revised" License
10 stars 4 forks source link

When stopping criteria raise TrainingExit remaining tasks might be skipped #61

Open MarcCote opened 8 years ago

MarcCote commented 8 years ago

Depending on where a stopping criterion is placed in the tasks list (e.g. when it is the first being added to the trainer tasks), as soon as they raised the tasks placed after in the trainer tasks list are skipped.

There is three options I could see.

  1. Set a flag whenever a TrainingExit is raised. Then at the end of the epoch, if such flag is set, the training stops.
  2. Add a notion of task priority. By default, we could set a low priority for StoppingCriterion tasks, so they are executed at the end.
  3. Leave it like that so it is more flexible. For some reasons someone might want to skip certain tasks when training stops. Note that this could also be achieved by option number 2 by manually changing the priority of the stopping criterion added to the trainer.