registerModel abstract method

void registerModel(
  1. String name,
  2. PredictiveModel model
)

Registers a PredictiveModel by the given name.

Registering a model will keep the current Isolate alive until the model is unregistered again using unregisterModel.

If a model is already registered with the given name, it will be unregistered before registering the new model.

Models registered in one isolate are available in all isolates, but perform their predictions in the isolate where they are registered in. To offload the prediction work from the main isolate, consider registering the model in a separate isolate.

Implementation

void registerModel(String name, PredictiveModel model);