Skip to main content

Model Maintenance

Model maintenance consists of viewing, altering, and deleting models.

Viewing Models

When IntegratedML performs training or validation, this process is known as a “training run” or a “validation run.”

IntegratedML provides the following views, within the INFORMATION_SCHEMA class, that can be used to query information about models, trained models, training runs, and validation runs:

ML_MODELS

This view returns one row for each model definition.

INFORMATION_SCHEMA.ML_MODELS contains the following columns:

Column Name Description
CREATE_TIME_STAMP Time when the model definition was created (UTC)
DEFAULT_SETTINGS Default settings the model definition’s provider uses
DEFAULT_TRAINED_MODEL_NAME Default trained model name, if one has been trained
DEFAULT_TRAINING_QUERY The FROM clause from the CREATE MODEL statement, if one was used
DESCRIPTION Description of model definition
MODEL_NAME Name of the model definition
PREDICTING_COLUMN_NAME Name of the label column
PREDICTING_COLUMN_TYPE Type of the label column
WITH_COLUMNS Names of the feature columns
See More

See Creating Model Definitions for information about model definitions.

ML_TRAINED_MODELS

This view returns one row for each trained model.

INFORMATION_SCHEMA.ML_TRAINED_MODELS contains the following columns:

Column Name Description
MODEL_INFO Model information
MODEL_NAME Name of the model definition
MODEL_TYPE The model type (classification, regression, or time series)
PROVIDER Provider used for training
TRAINED_MODEL_NAME Name of the trained model
TRAINED_TIMESTAMP Time when the trained model was created (UTC)
See More

See Training Models for information about trained models.

See Providers for information about providers.

ML_TRAINING_RUNS

This view returns one row for each training run.

INFORMATION_SCHEMA.ML_TRAINING_RUNS contains the following columns:

Column Name Description
COMPLETED_TIMESTAMP Time when the training run completed (UTC)
LOG Training log output from the provider
ML_CONFIGURATION_NAME Name of the ML configuration used for training
MODEL_NAME Name of the model definition
PROVIDER Name of the provider used for training
RUN_STATUS Status of training run
SETTINGS Any settings passed by a USING clause for the training run
START_TIMESTAMP Time when the training run started (UTC)
STATUS_CODE Training error (if encountered)
TRAINING_DURATION Duration of training (in seconds)
TRAINING_RUN_NAME Name of the training run
TRAINING_RUN_QUERY Query used to source data from feature and label columns for training
See More

See Training Models for information about training runs.

ML_VALIDATION_RUNS

This view returns one row for each validation run.

INFORMATION_SCHEMA.ML_VALIDATION_RUNS contains the following columns:

Column Name Description
COMPLETED_TIMESTAMP Time when the validation run completed (UTC)
LOG Validation log output
MODEL_NAME Name of the model definition
RUN_STATUS Validation status
SETTINGS Validation run settings
START_TIMESTAMP Time when the validation run started (UTC)
STATUS_CODE Validation error (if encountered)
TRAINED_MODEL_NAME Name of the trained model being validated
VALIDATION_DURATION Validation duration (in seconds)
VALIDATION_RUN_NAME Name of the validation run
VALIDATION_RUN_QUERY Full query for dataset specified by FROM
See More

See Validating Models for information about validation runs.

ML_VALIDATION_METRICS

This view returns one row for each validation metric of each validation run.

INFORMATION_SCHEMA.ML_VALIDATION_METRICS contains the following columns:

Column Name Description
METRIC_NAME Validation metric name
METRIC_VALUE Validation metric value
MODEL_NAME Model name
TARGET_VALUE Target value for validation metric
TRAINED_MODEL_NAME Name of the trained model for this run
VALIDATION_RUN_NAME Name of the validation run
See More

For information about the validation metrics that populate METRIC_NAME and METRIC_VALUE, see the InterSystems SQL Reference.

Altering Models

You can modify a model by using the ALTER MODEL statement.

Syntax

The ALTER MODEL statement has the following syntax:

ALTER MODEL model-name alter-action

Where alter-action can be one of the following:

  • PURGE ALL

  • PURGE integer DAYS

  • DEFAULT preferred-model-name

Examples

This example uses the PURGE clause to delete all training run and validation run data associated with the model WillLoanDefault:

ALTER MODEL WillLoanDefault PURGE ALL

This example uses the PURGE clause to delete training run and validation run data associated with the model WillLoanDefault that is older than 7 days old:

ALTER MODEL WillLoanDefault PURGE 7 DAYS
See More

You can confirm that your alter statements succeeded by querying the views listed in Viewing Models.

For complete information about the ALTER MODEL command, see the refernece.

Deleting Models

You can delete a model by using the DROP MODEL statement.

Syntax

The DROP MODEL statement has the following syntax:

DROP MODEL model-name

DROP MODEL deletes all training runs and validation runs for the associated model.

See More

You can confirm that your model has been deleted by querying the INFORMATION_SCHEMA.ML_MODELS view.

For complete information about the DROP MODEL command, see the InterSystems SQL Reference.

FeedbackOpens in a new tab