Metadata for the model. It is a column in the
Section 3.13.1.1, “The Model Catalog Table” and a
parameter in ML_MODEL_IMPORT
.
The default value for a model_metadata
field is NULL
.
MySQL 8.1.0 adds several fields that replace deprecated columns in the Section 3.13.1.1, “The Model Catalog Table”. It also adds fields that support ONNX model import. See: Section 3.13.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 isclassification
when used withML_MODEL_IMPORT
. This was added in MySQL 8.1.0. -
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. This was added in MySQL 8.1.0. -
target_column_name:
string
The name of the column in the training table that was specified as the target column. This was added in MySQL 8.1.0.
-
train_table_name:
string
The name of the input table specified in the
ML_TRAIN
query. This was added in MySQL 8.1.0. -
column_names:
JSON array
The feature columns used to train the model. This was added in MySQL 8.1.0.
-
model_explanation:
JSON object
The model explanation generated during training. See Section 3.13.7, “Model Explanations”. This was added in MySQL 8.1.0.
-
notes:
string
The
notes
specified in theML_TRAIN
query. It also records any error messages that occur during model training. This was added in MySQL 8.1.0. -
format:
string
The model serialization format.
HWMLv1.0
for a HeatWave AutoML model orONNX
for a ONNX model. The default isONNX
when used withML_MODEL_IMPORT
. -
status: Creating | Ready | Error
The status of the model. The default is
Ready
when used withML_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. As of MySQL 8.1.0, the error message also appears inmodel_metadata
notes
.
-
-
model_quality:
string
The quality of the model object. Either
low
orhigh
. This was added in MySQL 8.1.0. -
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_columns:
number
The number of rows selected by feature selection.
-
n_selected_rows:
number
The number of rows selected by adaptive sampling.
-
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. This was added in MySQL 8.1.0.
-
options:
JSON object
The
options
specified in theML_TRAIN
query. This was added in MySQL 8.1.0. -
training_params:
JSON object
Internal task dependent parameters used during
ML_TRAIN
. This was added in MySQL 8.1.0. -
onnx_inputs_info:
JSON object
Information about the format of the ONNX model inputs. This was added in MySQL 8.1.0, and only applies to ONNX models. See Section 3.13.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
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
Information about the format of the ONNX model outputs. This was added in MySQL 8.1.0, and only applies to ONNX models. See Section 3.13.2, “ONNX Model Import”.
Do not provide
onnx_outputs_info
if the model is not ONNX format, or iftask
isNULL
. 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
This maps prediction probabilities to predictions, known as labels.
-