Documentation Home
HeatWave User Guide
Related Documentation Download this Manual
PDF (US Ltr) - 2.1Mb
PDF (A4) - 2.0Mb


HeatWave User Guide  /  ...  /  ML_MODEL_LOAD

3.16.10 ML_MODEL_LOAD

The ML_MODEL_LOAD routine loads a model from the model catalog. A model remains loaded until the model is unloaded using the ML_MODEL_UNLOAD routine or until HeatWave AutoML is restarted by a HeatWave Cluster restart.

MySQL 9.0.0 introduces support for large models that changes how HeatWave AutoML stores models, see: Section 3.14.1, “The Model Catalog”. ML_MODEL_LOAD upgrades older models.

Use ML_MODEL_ACTIVE to check which models are active for which users. All active users and models share the amount of memory defined by the shape, and it might be necessary to schedule users. ML_MODEL_LOAD will raise an error if there are memory limitations.

To share models with other users, see: Section 3.14.10, “Sharing Models”.

ML_MODEL_LOAD Syntax

mysql> CALL sys.ML_MODEL_LOAD(model_handle, user);

ML_MODEL_LOAD parameters:

  • model_handle: Specifies the model handle or a session variable containing the model handle. For how to look up a model handle, see Section 3.14.8, “Model Handles”.

  • user: The MySQL user name of the model owner. Specify NULL if the model owner is the current user.

    This parameter is ignored, and it can be set to NULL.

Syntax Examples

  • An ML_MODEL_LOAD call with NULL specified, indicating that the model belongs to the user executing the ML_MODEL_LOAD call:

    mysql> CALL sys.ML_MODEL_LOAD('ml_data.iris_train_user1_1636729526', NULL);
  • An ML_MODEL_LOAD call that specifies a session variable containing the model handle:

    mysql> CALL sys.ML_MODEL_LOAD(@iris_model, NULL);
  • An ML_MODEL_LOAD call that specifies the model owner:

    mysql> CALL sys.ML_MODEL_LOAD('ml_data.iris_train_user1_1636729526', user1);