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


HeatWave User Guide  /  ...  /  Model Metadata

3.14.1.3 Model Metadata

Metadata for the model. It is a column in the model catalog, see Section 3.14.1.1, “The Model Catalog Table”, and a parameter in ML_MODEL_IMPORT. The default value for model_metadata is NULL.

model_metadata has several fields that replace deprecated columns in the model catalog, and fields that support ONNX model import, see: Section 3.14.2, “ONNX Model Import”.

model_metadata contains the following metadata as key-value pairs in JSON format:

  • task: string

    The task type specified in the ML_TRAIN query. The default is classification when used with ML_MODEL_IMPORT.

  • build_timestamp: number

    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: string

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

  • train_table_name: string

    The name of the input table specified in the ML_TRAIN query.

  • column_names: JSON array

    The feature columns used to train the model.

  • model_explanation: JSON object literal

    The model explanation generated during training. See Section 3.14.7, “Model Explanations”.

  • notes: string

    The notes specified in the ML_TRAIN query. It also records any error messages that occur during model training.

  • format: string

    The model serialization format. HWMLv1.0 for a HeatWave AutoML model or ONNX for a ONNX model. The default is ONNX when used with ML_MODEL_IMPORT.

  • status: string

    The status of the model. The default is Ready when used with ML_MODEL_IMPORT.

    • Creating

      The model is still being created.

    • Ready

      The model is trained and active.

    • Error

      Either training was canceled or an error occurred during training. Any error message appears in the notes column. The error message also appears in model_metadata notes.

  • model_quality: string

    The quality of the model object. Either low or high.

  • training_time: number

    The time in seconds taken to train the model.

  • algorithm_name: string

    The name of the chosen algorithm.

  • training_score: number

    The cross-validation score achieved for the model by training.

  • n_rows: number

    The number of rows in the training table.

  • n_columns: number

    The number of columns in the training table.

  • n_selected_rows: number

    The number of rows selected by adaptive sampling.

  • n_selected_columns: number

    The number of columns selected by feature selection.

  • optimization_metric: string

    The optimization metric used for training.

  • selected_column_names: JSON array

    The names of the columns selected by feature selection.

  • contamination: number

    The contamination factor for a model.

  • options: JSON object literal

    The options specified in the ML_TRAIN query.

  • training_params: JSON object literal

    Internal task dependent parameters used during ML_TRAIN.

  • onnx_inputs_info: JSON object literal

    Information about the format of the ONNX model inputs. This only applies to ONNX models. See Section 3.14.2, “ONNX Model Import”.

    Do not provide onnx_inputs_info if the model is not ONNX format. This will cause an error.

    • data_types_map: JSON object literal

      This maps the data type of each column to an ONNX model data type. The default value is:

      JSON_OBJECT("tensor(int64)": "int64", "tensor(float)": "float32", "tensor(string)": "str_")
  • onnx_outputs_info: JSON object literal

    Information about the format of the ONNX model outputs. This only applies to ONNX models. See Section 3.14.2, “ONNX Model Import”.

    Do not provide onnx_outputs_info if the model is not ONNX format, or if task is NULL. This will cause an error.

    • predictions_name: string

      This name determines which of the ONNX model outputs is associated with predictions.

    • prediction_probabilities_name: string

      This name determines which of the ONNX model outputs is associated with prediction probabilities.

    • labels_map: JSON object literal

      This maps prediction probabilities to predictions, known as labels.

  • training_drift_metric: JSON object literal

    Contains data drift information about the training data, see: Section 3.14.11, “Data Drift Detection”. This only applies to classification and regression models.

    • mean: number

      The mean value of drift metrics of all the training data. ≥ 0.

    • variance: number

      The variance value of drift metrics of all the training data. ≥ 0.

    Both mean and variance should be low. To avoid divide by zero, the lowest value for both is 1e-10.

  • chunks: number

    The total number of chunks that the model has been split into. This was added in MySQL 9.0.0.