Training worker

Current version: 9.3

The training worker (TrainingWorker) is a deferred worker that starts the training of a machine learning model. The training worker does not perform the actual training - it calls the TrainAsync() method on the supplied model wrapper, which in turn defines the training logic.

For example, you might send a request to Microsoft Machine Learning Server that includes a training script and the location of training data in temporary storage.

To use the training worker, register a training worker task.

Training worker options dictionaries

A training worker task requires an implementation of Sitecore.Processing.Engine.ML.Abstractions.IModel. This interface defines:

  • The model training logic (defined by the TrainAsync() method)

  • The data projection associated with the model, which is not used by the training worker.

  • The model evaluation logic (defined by EvaluateAsync() method), which is not used by the training worker.


An IModel is required even if you are using projection outside of a machine learning context. If you do not require the training or evaluation methods that are included in this interface, you can return empty results.

  • When you register a training worker task, you must pass in an implementation of the Sitecore.Processing.Engine.ML.Abstractions.IModel interface.

  • The IModel implementation has a TrainAsync() method

  • The training worker calls the TrainAsync() method on the IModel.

  • Integrate with Machine Learning Server / Script Session Pool

Do you have some feedback for us?

If you have suggestions for improving this article,