IMLModelTrainerJob class
The functionality is relevant to Classic UI.
The IMLModelTrainerJob
class implements the IJobExecutor
and IMLModelTrainerJob
interfaces. It is used for model synchronization tasks. The class orchestrates model processing in Creatio by launching data transfer sessions, starting trainings, and checking the status of the models processed by the service. Out of the box, the class launches instances using the task scheduler through the Execute()
method of the IJobExecutor
interface.
Methods
RunTrainer()
A virtual method that encapsulates the synchronization logic. The base implementation of this method performs the following actions:
-
Select models for training. The records are selected from the ML model (
MLModel
code) lookup based on the following filter:- The Query metadata for selecting additional training data (
MetaData
code) and Query for selecting additional training data (TrainingSetQuery
code) fields are populated. - The Status (
State
code) field value is not set to "Not started," "Done," "Error," or not populated at all. - The Retrain after, days (
TrainFrequency
code) field is more than "0." - The number of days since the last training, i. e., the Last attempt to train date (
TriedToTrainOn
code) field value. The Retrain after, days (TrainFrequency
code) field defines the training frequency.
The predictive model trainer sends data for each record in this selection to the service.
- The Query metadata for selecting additional training data (
-
Select previously trained models.
-
Update trained model status if needed.
The data transfer session for the selection starts with each suitable model. The data is sent in packages of 1000 records during the session. For each model, the selection size is limited to 75 000 records.