You can configure model metrics for a model when you register the model and use these metrics to compare between different versions of the model. This can help you evaluate the performance differences between different model versions. This topic describes how to configure and view model metrics.
Limits
The length of the serialized configuration content of a model metric cannot exceed 8,192 bytes.
Configure model metrics
When you register a new model, you can select Advanced Settings to configure Model Metrics. For more information, see Register and manage models.
The following code provides an example on how to configure model metrics.
{
"Results": [{
"Dataset": {
"Uri": "oss://xxxx/"
},
"Metrics": {
"lr": 0.000001,
"train_loss": 2.6345
}
},{
"Dataset": {
"DatasetId": "d-alksdcjkasdfjhr"
},
"Metrics": {
"lr": 0.000001,
"train_loss": 2.6345
}
}]
}
The following table describes the key parameters.
Parameter | Required | Description | |
Results | Dataset | No | The dataset used to evaluate the model. You can configure the following parameters:
You can also customize Dataset parameters based on the sample configuration. For example, you can add a dataset name parameter. |
Metrics | Yes | The metrics for model performance evaluation. You can also customize the Metrics parameter based on the sample configuration.
|
View model metrics
You can perform the following steps to view the metrics data of different versions of the model after the model is registered.
On the Model Management page, click the model name to go to the model details page.
In the Model Versions section, find the version that you want to view and click Details in the Operation column.
In the Model version panel, view the metrics of the model.
Model metrics are displayed in the following formats:
JSON
Table