Class TrainerManager

java.lang.Object
com.logicaldoc.ai.trainer.TrainerManager

@Component("trainerManager") public class TrainerManager extends Object
A manager to concentrate the scheduling of the AI trainings
Since:
9.2
Author:
Marco Meschieri - LogicalDOC
  • Constructor Details

    • TrainerManager

      public TrainerManager()
  • Method Details

    • schedule

      public void schedule(AIModel<?,?> model) throws org.quartz.SchedulerException
      Schedules the training of a given model
      Parameters:
      model - The model to be trained
      Throws:
      org.quartz.SchedulerException - Error in the scheduling layer
    • unschedule

      public void unschedule(long modelId) throws org.quartz.SchedulerException
      Un-schedules the training a given model
      Parameters:
      modelId - identifier of the model to unschedule
      Throws:
      org.quartz.SchedulerException - Error in the scheduling layer
    • getTrainerJob

      public TrainerJob getTrainerJob(long modelId) throws org.quartz.SchedulerException
      If a training job is running fior a given model, this method returns it
      Parameters:
      modelId - Identifier of the model
      Returns:
      The current training job
      Throws:
      org.quartz.SchedulerException - Error in the scheduling layer
    • train

      public Future<TrainingResult> train(AIModel<?,?> model, AIModelHistory transaction)
      Executes the training immediately
      Parameters:
      model - The model to train
      transaction - The current transaction
      Returns:
      a future with the training result
    • init

      @PostConstruct public void init()