The Monitoring Config JSON captures all information required to register a model, a prediction dataset, or a ground truth dataset. This section describes the structure of the Monitoring Config JSON file. The following is a sample config:
{
"variables": [
{
"name": "age",
"valueType": "numerical",
"variableType": "feature",
"featureImportance": 0.9
},
{
"name": "y",
"valueType": "categorical",
"variableType": "prediction"
},
{
"name": "date",
"valueType": "datetime",
"variableType": "timestamp"
},
{
"name": "RowId",
"valueType": "string",
"variableType": "row_identifier"
}
],
"datasetDetails": {
"name": "TrainingData.csv",
"datasetType": "file",
"datasetConfig": {
"path": "TrainingData.csv",
"fileFormat": "csv"
},
"datasourceName": "abc-shared-bucket",
"datasourceType": "s3"
},
"modelMetadata": {
"name": "test_psg",
"modelType": "classification",
"version": "2",
"description": "",
"author": "testadmin"
}
}
An array of variables that declare all features and prediction columns that you want to analyze. For each member in the array, specify the name
, variableType
, and valueType
.
variableType
variableType
provides the attribute that identifies the column. Supported types are:
-
feature
-
Can only be of
valueType
numerical or categorical. -
Input feature of the model.
-
Data drift will be calculated for this data column.
-
Must be declared while registering the model along with its training data.
-
The column must be present in all training and prediction datasets registered with the model.
-
-
prediction (optional)
-
When declared, there can only be one Prediction column.
-
Can only be of
valueType
numerical or categorical. -
Output prediction of the model.
-
Data drift and model quality metrics are calculated for this data column. Include this column when registering your model to ensure both data drift and model quality analysis can be run. If it isn’t included, model quality metrics won’t be computed.
-
-
timestamp (optional)
-
When present, there can be only one
timestamp
column. -
Can only be of datetime
valueType
. -
Although you can declare this column when adding prediction data for the first time, Domino recommends that it be declared during model registration.
-
Identifies the column that contains the timestamp for the prediction made. If not declared, the ingestion time of the data in the Model Monitor is used as the timestamp of the prediction.
-
Must contain the date/time when the prediction was made. Column values must follow the ISO 8601 time format.
-
When it is not declared, the ingestion time of the prediction dataset into the Model Monitor is substituted as the timestamp of prediction.
-
To use automatic ingestion for Snowflake, you must include this column. Snowflake’s documentation recommends setting the timezone to UTC for both the Spark cluster and the Snowflake deployment.
-
-
row_identifier (optional)
-
Can only be of string
valueType
. -
Uniquely identifies each prediction row. Typically referred to as prediction ID, transaction ID, and so on.
-
When present, there can be only one
row_identifier
column. -
Although you can declare this column when adding prediction data for the first time, Domino recommends that it be declared during model registration.
-
Values are used to match ground truth data to the predictions to calculate model quality metrics. Model quality metrics will not be calculated if this column is not present. If used, must be present in both prediction and ground truth datasets.
-
-
ground_truth
-
Identifies the column that contains the ground truth labels in the ground truth datasets.
-
-
sample_weight
-
Column that contains the weight to be associated with each prediction to calculate the Gini Norm metric.
-
-
prediction_probability
-
Column that contains the probability value for the model’s prediction. Can be a single value (maps to the probability value of the positive class) or a list of values (the length of the list must match the number of unique prediction labels or classes present in the training dataset).
-
Note
|
For a field of this type, include |
Captures metadata related to the model.
Specify the name
, modelVersion
, modelType
, dataset
, dateCreated
, description
. and author
attributes.
dateCreated
must be in a valid UTC format (ISO 8601). Valid values for modelType
are classification
and regression
.
Highlights the overall impact of the feature on predictions made to the model, relative to other features.
Bins are used to represent probability distributions and divergence values for data drift. The number of bins impacts the quality of drift values and in general, Model Monitor’s performance itself.
For more information, see Supported binning methods.