MySQL HeatWave User Guide
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
the MySQL HeatWave Cluster restarts.
MySQL 9.0.0 introduces support for large models that changes how
MySQL HeatWave AutoML stores models. See
Section 6.9.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
generates an error
if there are memory limitations.
Set the following parameters.
model_handle
: Specifies the model
handle or a session variable containing the model handle.
To look up a model handle, see
Query the Model Handle.
user
: The MySQL user name of the model
owner. You can set this to NULL
. To
learn how to share models with other users, see
Share a
Model.
An example that specifies the model handle and sets the
user
parameter to
NULL
.
mysql> CALL sys.ML_MODEL_LOAD('ml_data.iris_train_user1
_1636729526', NULL);
An example that specifies a session variable containing the model handle.
mysql> CALL sys.ML_MODEL_LOAD(@iris_model, NULL);
An example that specifies the model handle and the model owner.
mysql> CALL sys.ML_MODEL_LOAD('ml_data.iris_train_user1
_1636729526', user1
);