MySQL HeatWave User Guide  /  ...  /  Loading Models

3.9.3 Loading Models

A model must be loaded from the model catalog into HeatWave before running HeatWave ML routines other than ML_TRAIN. A model remains loaded and can be called repetitively by HeatWave ML routines until it is unloaded using the ML_MODEL_UNLOAD routine or until the HeatWave Cluster is restarted.

A model can only be loaded by the MySQL user that created the model. For more information, see Section 3.9.10, “Sharing Models”.

You can load multiple models but to avoid taking up too much space in memory, limit the number of loaded models to three.

For ML_MODEL_LOAD parameter descriptions, see Section 3.10.9, “ML_MODEL_LOAD”.

The following example loads a HeatWave ML model from the model catalog:

CALL sys.ML_MODEL_LOAD(@census_model, NULL);

where:

  • @census_model is the session variable that contains the model handle.

  • NULL is specified in place of the user name of the model owner.

A fully qualified ML_MODEL_LOAD call that specifies the model handle and owning user's name is specified as follows:

CALL sys.ML_MODEL_LOAD('heatwaveml_bench.census_train_user1_1636729526', 'user1');

To look up a model handle, see Section 3.9.8, “Model Handles”.