Package com.logicaldoc.ai.trainer
Class TrainerManager
java.lang.Object
com.logicaldoc.ai.trainer.TrainerManager
A manager to concentrate the scheduling of the AI trainings
- Since:
- 9.2
- Author:
- Marco Meschieri - LogicalDOC
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetTrainerJob
(long modelId) If a training job is running fior a given model, this method returns itvoid
init()
void
Schedules the training of a given modeltrain
(AIModel<?, ?> model, AIModelHistory transaction) Executes the training immediatelyvoid
unschedule
(long modelId) Un-schedules the training a given model
-
Constructor Details
-
TrainerManager
public TrainerManager()
-
-
Method Details
-
schedule
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
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
Executes the training immediately- Parameters:
model
- The model to traintransaction
- The current transaction- Returns:
- a future with the training result
-
init
@PostConstruct public void init()
-