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

MySQL HeatWave User Guide  /  ...  /  The Model Catalog

3.7.1 The Model Catalog

HeatWave ML stores machine learning models in a model catalog in MySQL. A model catalog is a standard MySQL table named MODEL_CATALOG. HeatWave ML creates a model catalog for any user that creates a machine learning model.

The MODEL_CATALOG table is created in a schema named ML_SCHEMA_user_name, where the user_name is the name of the owning user.

When a user creates a model, the ML_TRAIN routine creates the model catalog schema and table if they do not exist. ML_TRAIN inserts the model as a row in the MODEL_CATALOG table at the end of training.

A model catalog is accessible only to the owning user unless the user grants privileges on the model catalog to another user. This means that HeatWave ML routines can only use models that are accessible to the user running the routines. For information about granting model catalog privileges, see Section 3.7.9, “Sharing Models”.

A database administrator can manage a model catalog table as they would a regular MySQL table.

The Model Catalog Table

The MODEL_CATALOG table has the following columns:

  • model_id

    A unique auto-incrementing numeric identifier for the model.

  • model_handle

    The model_handle. The model handle is generated when the ML_TRAIN routine is executed on a training dataset. The model_handle format is schemaName_tableName_userName_No, as in the following example: heatwaveml_bench.census_train_user1_1636729526.


    The format of the model handle is subject to change.

  • model_object

    A string in JSON format containing the serialized HeatWave ML model.

  • model_owner

    The user who initiated the ML_TRAIN routine to create the model.

  • build_timestamp

    A timestamp indicating when the model was created (in UNIX epoch time). A model is created when the ML_TRAIN routine finishes executing.

  • target_column_name

    The name of the column in the training table that was specified as the target column.

  • train_table_name

    The name of the input table specified by the ML_TRAIN routine.

  • model_object_size

    The model object size, in bytes.

  • model_type

    The type of model (algorithm) selected by ML_TRAIN to build the model.

  • task

    The task type specified in the ML_TRAIN query (classification or regression).

  • column_names

    The feature columns used to train the model.

  • model_explanations

    The model explanation generated during training. See Section 3.7.6, “Model Explanations”. This column was added in MySQL 8.0.29.

  • last_accessed

    The last time the model was accessed. HeatWave ML routines update this value to the current timestamp when accessing the model.