

本文属于机器翻译版本。若本译文内容与英语原文存在差异，则一律以英文原文为准。

# 更新模型版本的详细信息
<a name="model-registry-details"></a>

您可以使用 适用于 Python (Boto3) 的 AWS SDK 或 Amazon SageMaker Studio 控制台查看和更新特定型号版本的详细信息。

**重要**  
Amazon SageMaker AI 将模型卡集成到模型注册表中。在模型注册表中注册的模型软件包包括作为模型软件包组成部分的简化模型卡。有关更多信息，请参阅 [模型软件包模型卡模式 (Studio)](#model-card-schema)。

## 查看和更新模型版本的详细信息 (Boto3)
<a name="model-registry-details-api"></a>

要使用 Boto3 查看模型版本的详细信息，请完成以下步骤。

1. 调用 `list_model_packages` API 操作来查看模型组中的模型版本。

   ```
   sm_client.list_model_packages(ModelPackageGroupName="ModelGroup1")
   ```

   响应是模型包摘要列表。您可以从此列表中获取模型版本的 Amazon 资源名称 (ARN)。

   ```
   {'ModelPackageSummaryList': [{'ModelPackageGroupName': 'AbaloneMPG-16039329888329896',
      'ModelPackageVersion': 1,
      'ModelPackageArn': 'arn:aws:sagemaker:us-east-2:123456789012:model-package/ModelGroup1/1',
      'ModelPackageDescription': 'TestMe',
      'CreationTime': datetime.datetime(2020, 10, 29, 1, 27, 46, 46000, tzinfo=tzlocal()),
      'ModelPackageStatus': 'Completed',
      'ModelApprovalStatus': 'Approved'}],
    'ResponseMetadata': {'RequestId': '12345678-abcd-1234-abcd-aabbccddeeff',
     'HTTPStatusCode': 200,
     'HTTPHeaders': {'x-amzn-requestid': '12345678-abcd-1234-abcd-aabbccddeeff',
      'content-type': 'application/x-amz-json-1.1',
      'content-length': '349',
      'date': 'Mon, 23 Nov 2020 04:56:50 GMT'},
     'RetryAttempts': 0}}
   ```

1. 调用 `describe_model_package` 以查看模型版本的详细信息。您传入在 `list_model_packages` 调用输出中获得的模型版本的 ARN。

   ```
   sm_client.describe_model_package(ModelPackageName="arn:aws:sagemaker:us-east-2:123456789012:model-package/ModelGroup1/1")
   ```

   此调用的输出是一个包含模型版本详细信息的 JSON 对象。

   ```
   {'ModelPackageGroupName': 'ModelGroup1',
    'ModelPackageVersion': 1,
    'ModelPackageArn': 'arn:aws:sagemaker:us-east-2:123456789012:model-package/ModelGroup/1',
    'ModelPackageDescription': 'Test Model',
    'CreationTime': datetime.datetime(2020, 10, 29, 1, 27, 46, 46000, tzinfo=tzlocal()),
    'InferenceSpecification': {'Containers': [{'Image': '257758044811.dkr.ecr.us-east-2.amazonaws.com/sagemaker-xgboost:1.0-1-cpu-py3',
       'ImageDigest': 'sha256:99fa602cff19aee33297a5926f8497ca7bcd2a391b7d600300204eef803bca66',
       'ModelDataUrl': 's3://sagemaker-us-east-2-123456789012/ModelGroup1/pipelines-0gdonccek7o9-AbaloneTrain-stmiylhtIR/output/model.tar.gz'}],
     'SupportedTransformInstanceTypes': ['ml.m5.xlarge'],
     'SupportedRealtimeInferenceInstanceTypes': ['ml.t2.medium', 'ml.m5.xlarge'],
     'SupportedContentTypes': ['text/csv'],
     'SupportedResponseMIMETypes': ['text/csv']},
    'ModelPackageStatus': 'Completed',
    'ModelPackageStatusDetails': {'ValidationStatuses': [],
     'ImageScanStatuses': []},
    'CertifyForMarketplace': False,
    'ModelApprovalStatus': 'PendingManualApproval',
    'LastModifiedTime': datetime.datetime(2020, 10, 29, 1, 28, 0, 438000, tzinfo=tzlocal()),
    'ResponseMetadata': {'RequestId': '12345678-abcd-1234-abcd-aabbccddeeff',
     'HTTPStatusCode': 200,
     'HTTPHeaders': {'x-amzn-requestid': '212345678-abcd-1234-abcd-aabbccddeeff',
      'content-type': 'application/x-amz-json-1.1',
      'content-length': '1038',
      'date': 'Mon, 23 Nov 2020 04:59:38 GMT'},
     'RetryAttempts': 0}}
   ```

### 模型软件包模型卡模式 (Studio)
<a name="model-card-schema"></a>

与模型版本相关的所有详细信息都封装在模型软件包的模型卡中。模型包的模型卡是 Amazon SageMaker 模型卡的特殊用法，其架构得到了简化。模型软件包模型卡模式显示在以下可扩展下拉菜单中。

#### 模型软件包模型卡模式
<a name="collapsible-section-model-package-model-card-schema"></a>

```
{
  "title": "SageMakerModelCardSchema",
  "description": "Schema of a model package’s model card.",
  "version": "0.1.0",
  "type": "object",
  "additionalProperties": false,
  "properties": {
    "model_overview": {
      "description": "Overview about the model.",
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "model_creator": {
          "description": "Creator of model.",
          "type": "string",
          "maxLength": 1024
        },
        "model_artifact": {
          "description": "Location of the model artifact.",
          "type": "array",
          "maxContains": 15,
          "items": {
            "type": "string",
            "maxLength": 1024
          }
        }
      }
    },
    "intended_uses": {
      "description": "Intended usage of model.",
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "purpose_of_model": {
          "description": "Reason the model was developed.",
          "type": "string",
          "maxLength": 2048
        },
        "intended_uses": {
          "description": "Intended use cases.",
          "type": "string",
          "maxLength": 2048
        },
        "factors_affecting_model_efficiency": {
          "type": "string",
          "maxLength": 2048
        },
        "risk_rating": {
          "description": "Risk rating for model card.",
          "$ref": "#/definitions/risk_rating"
        },
        "explanations_for_risk_rating": {
          "type": "string",
          "maxLength": 2048
        }
      }
    },
    "business_details": {
      "description": "Business details of model.",
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "business_problem": {
          "description": "Business problem solved by the model.",
          "type": "string",
          "maxLength": 2048
        },
        "business_stakeholders": {
          "description": "Business stakeholders.",
          "type": "string",
          "maxLength": 2048
        },
        "line_of_business": {
          "type": "string",
          "maxLength": 2048
        }
      }
    },
    "training_details": {
      "description": "Overview about the training.",
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "objective_function": {
          "description": "The objective function for which the model is optimized.",
          "function": {
            "$ref": "#/definitions/objective_function"
          },
          "notes": {
            "type": "string",
            "maxLength": 1024
          }
        },
        "training_observations": {
          "type": "string",
          "maxLength": 1024
        },
        "training_job_details": {
          "type": "object",
          "additionalProperties": false,
          "properties": {
            "training_arn": {
              "description": "SageMaker Training job ARN.",
              "type": "string",
              "maxLength": 1024
            },
            "training_datasets": {
              "description": "Location of the model datasets.",
              "type": "array",
              "maxContains": 15,
              "items": {
                "type": "string",
                "maxLength": 1024
              }
            },
            "training_environment": {
              "type": "object",
              "additionalProperties": false,
              "properties": {
                "container_image": {
                  "description": "SageMaker training image URI.",
                  "type": "array",
                  "maxContains": 15,
                  "items": {
                    "type": "string",
                    "maxLength": 1024
                  }
                }
              }
            },
            "training_metrics": {
              "type": "array",
              "items": {
                "maxItems": 50,
                "$ref": "#/definitions/training_metric"
              }
            },
            "user_provided_training_metrics": {
              "type": "array",
              "items": {
                "maxItems": 50,
                "$ref": "#/definitions/training_metric"
              }
            },
            "hyper_parameters": {
              "type": "array",
              "items": {
                "maxItems": 100,
                "$ref": "#/definitions/training_hyper_parameter"
              }
            },
            "user_provided_hyper_parameters": {
              "type": "array",
              "items": {
                "maxItems": 100,
                "$ref": "#/definitions/training_hyper_parameter"
              }
            }
          }
        }
      }
    },
    "evaluation_details": {
      "type": "array",
      "default": [],
      "items": {
        "type": "object",
        "required": [
          "name"
        ],
        "additionalProperties": false,
        "properties": {
          "name": {
            "type": "string",
            "pattern": ".{1,63}"
          },
          "evaluation_observation": {
            "type": "string",
            "maxLength": 2096
          },
          "evaluation_job_arn": {
            "type": "string",
            "maxLength": 256
          },
          "datasets": {
            "type": "array",
            "items": {
              "type": "string",
              "maxLength": 1024
            },
            "maxItems": 10
          },
          "metadata": {
            "description": "Additional attributes associated with the evaluation results.",
            "type": "object",
            "additionalProperties": {
              "type": "string",
              "maxLength": 1024
            }
          },
          "metric_groups": {
            "type": "array",
            "default": [],
            "items": {
              "type": "object",
              "required": [
                "name",
                "metric_data"
              ],
              "properties": {
                "name": {
                  "type": "string",
                  "pattern": ".{1,63}"
                },
                "metric_data": {
                  "type": "array",
                  "items": {
                    "anyOf": [
                      {
                        "$ref": "#/definitions/simple_metric"
                      },
                      {
                        "$ref": "#/definitions/linear_graph_metric"
                      },
                      {
                        "$ref": "#/definitions/bar_chart_metric"
                      },
                      {
                        "$ref": "#/definitions/matrix_metric"
                      }
                    ]

                  }
                }
              }
            }
          }
        }
      }
    },
    "additional_information": {
      "additionalProperties": false,
      "type": "object",
      "properties": {
        "ethical_considerations": {
          "description": "Ethical considerations for model users.",
          "type": "string",
          "maxLength": 2048
        },
        "caveats_and_recommendations": {
          "description": "Caveats and recommendations for model users.",
          "type": "string",
          "maxLength": 2048
        },
        "custom_details": {
          "type": "object",
          "additionalProperties": {
            "$ref": "#/definitions/custom_property"
          }
        }
      }
    }
  },
  "definitions": {
    "source_algorithms": {
      "type": "array",
      "minContains": 1,
      "maxContains": 1,
      "items": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "algorithm_name"
        ],
        "properties": {
          "algorithm_name": {
            "description": "The name of the algorithm used to create the model package. The algorithm must be either an algorithm resource in your SageMaker AI account or an algorithm in AWS Marketplace that you are subscribed to.",
            "type": "string",
            "maxLength": 170
          },
          "model_data_url": {
            "description": "Amazon S3 path where the model artifacts, which result from model training, are stored.",
            "type": "string",
            "maxLength": 1024
          }
        }
      }
    },
    "inference_specification": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "containers"
      ],
      "properties": {
        "containers": {
          "description": "Contains inference related information used to create model package.",
          "type": "array",
          "minContains": 1,
          "maxContains": 15,
          "items": {
            "type": "object",
            "additionalProperties": false,
            "required": [
              "image"
            ],
            "properties": {
              "model_data_url": {
                "description": "Amazon S3 path where the model artifacts, which result from model training, are stored.",
                "type": "string",
                "maxLength": 1024
              },
              "image": {
                "description": "Inference environment path. The Amazon Elastic Container Registry (Amazon ECR) path where inference code is stored.",
                "type": "string",
                "maxLength": 255
              },
              "nearest_model_name": {
                "description": "The name of a pre-trained machine learning benchmarked by an Amazon SageMaker Inference Recommender model that matches your model.",
                "type": "string"
              }
            }
          }
        }
      }
    },
    "risk_rating": {
      "description": "Risk rating of model.",
      "type": "string",
      "enum": [
        "High",
        "Medium",
        "Low",
        "Unknown"
      ]
    },
    "custom_property": {
      "description": "Additional property.",
      "type": "string",
      "maxLength": 1024
    },
    "objective_function": {
      "description": "Objective function for which the training job is optimized.",
      "additionalProperties": false,
      "properties": {
        "function": {
          "type": "string",
          "enum": [
            "Maximize",
            "Minimize"
          ]
        },
        "facet": {
          "type": "string",
          "maxLength": 63
        },
        "condition": {
          "type": "string",
          "maxLength": 63
        }
      }
    },
    "training_metric": {
      "description": "Training metric data.",
      "type": "object",
      "required": [
        "name",
        "value"
      ],
      "additionalProperties": false,
      "properties": {
        "name": {
          "type": "string",
          "pattern": ".{1,255}"
        },
        "notes": {
          "type": "string",
          "maxLength": 1024
        },
        "value": {
          "type": "number"
        }
      }
    },
    "training_hyper_parameter": {
      "description": "Training hyperparameter.",
      "type": "object",
      "required": [
        "name",
        "value"
      ],
      "additionalProperties": false,
      "properties": {
        "name": {
          "type": "string",
          "pattern": ".{1,255}"
        },
        "value": {
          "type": "string",
          "pattern": ".{1,255}"
        }
      }
    },
    "linear_graph_metric": {
      "type": "object",
      "required": [
        "name",
        "type",
        "value"
      ],
      "additionalProperties": false,
      "properties": {
        "name": {
          "type": "string",
          "pattern": ".{1,255}"
        },
        "notes": {
          "type": "string",
          "maxLength": 1024
        },
        "type": {
          "type": "string",
          "enum": [
            "linear_graph"
          ]
        },
        "value": {
          "anyOf": [
            {
              "type": "array",
              "items": {
                "type": "array",
                "items": {
                  "type": "number"
                },
                "minItems": 2,
                "maxItems": 2
              },
              "minItems": 1
            }
          ]
        },
        "x_axis_name": {
          "$ref": "#/definitions/axis_name_string"
        },
        "y_axis_name": {
          "$ref": "#/definitions/axis_name_string"
        }
      }
    },
    "bar_chart_metric": {
      "type": "object",
      "required": [
        "name",
        "type",
        "value"
      ],
      "additionalProperties": false,
      "properties": {
        "name": {
          "type": "string",
          "pattern": ".{1,255}"
        },
        "notes": {
          "type": "string",
          "maxLength": 1024
        },
        "type": {
          "type": "string",
          "enum": [
            "bar_chart"
          ]
        },
        "value": {
          "anyOf": [
            {
              "type": "array",
              "items": {
                "type": "number"
              },
              "minItems": 1
            }
          ]
        },
        "x_axis_name": {
          "$ref": "#/definitions/axis_name_array"
        },
        "y_axis_name": {
          "$ref": "#/definitions/axis_name_string"
        }
      }
    },
    "matrix_metric": {
      "type": "object",
      "required": [
        "name",
        "type",
        "value"
      ],
      "additionalProperties": false,
      "properties": {
        "name": {
          "type": "string",
          "pattern": ".{1,255}"
        },
        "notes": {
          "type": "string",
          "maxLength": 1024
        },
        "type": {
          "type": "string",
          "enum": [
            "matrix"
          ]
        },
        "value": {
          "anyOf": [
            {
              "type": "array",
              "items": {
                "type": "array",
                "items": {
                  "type": "number"
                },
                "minItems": 1,
                "maxItems": 20
              },
              "minItems": 1,
              "maxItems": 20
            }
          ]
        },
        "x_axis_name": {
          "$ref": "#/definitions/axis_name_array"
        },
        "y_axis_name": {
          "$ref": "#/definitions/axis_name_array"
        }
      }
    },
    "simple_metric": {
      "description": "Metric data.",
      "type": "object",
      "required": [
        "name",
        "type",
        "value"
      ],
      "additionalProperties": false,
      "properties": {
        "name": {
          "type": "string",
          "pattern": ".{1,255}"
        },
        "notes": {
          "type": "string",
          "maxLength": 1024
        },
        "type": {
          "type": "string",
          "enum": [
            "number",
            "string",
            "boolean"
          ]
        },
        "value": {
          "anyOf": [
            {
              "type": "number"
            },
            {
              "type": "string",
              "maxLength": 63
            },
            {
              "type": "boolean"
            }
          ]
        },
        "x_axis_name": {
          "$ref": "#/definitions/axis_name_string"
        },
        "y_axis_name": {
          "$ref": "#/definitions/axis_name_string"
        }
      }
    },
    "axis_name_array": {
      "type": "array",
      "items": {
        "type": "string",
        "maxLength": 63
      }
    },
    "axis_name_string": {
      "type": "string",
      "maxLength": 63
    }
  }
}
```

## 查看和更新模型版本（Studio 或 Studio Classic）的详细信息
<a name="model-registry-details-studio"></a>

要查看和更新模型版本的详细信息，请根据您使用的是 Studio 还是 Studio Classic 完成以下步骤。在 Studio Classic 中，您可以更新模型版本的批准状态。有关更多信息，请参阅 [更新模型的批准状态](model-registry-approve.md)。另一方面，在 Studio 中， SageMaker AI 为模型包创建模型卡，模型版本用户界面提供更新模型卡片中详细信息的选项。

------
#### [ Studio ]

1. 按照[启动 Amazon SageMaker Studio 中的说明打开 SageMaker Studio](https://docs.aws.amazon.com/sagemaker/latest/dg/studio-updated-launch.html) 控制台。

1. 在左侧导航窗格中，从菜单中选择**模型**。

1. 如果尚未选择**已注册模型**选项卡，请选择该选项卡。

1. 在**已注册模型**选项卡标签下方，选择**模型组**（如果尚未选择）。

1. 选择包含要查看的模型版本的模型组名称。

1. 在模型版本列表中，选择要查看的模型版本。

1. 选择以下选项卡之一。
   + **训练**：查看或编辑与训练作业相关的详细信息，包括性能指标、构件、IAM 角色和加密以及容器。有关更多信息，请参阅 [添加训练作业 (Studio)](model-registry-details-studio-training.md)。
   + **评估**：查看或编辑与训练作业相关的详细信息，如性能指标、评估数据集和安全性。有关更多信息，请参阅 [添加评估作业 (Studio)](model-registry-details-studio-evaluate.md)。
   + **审核**：查看或编辑与模型的商业目的、用途、风险以及算法和性能限制等技术细节相关的高级详细信息。有关更多信息，请参阅 [更新审计（治理）信息 (Studio)](model-registry-details-studio-audit.md)。
   + **部署**：查看或编辑构成端点的推理映像容器和实例的位置。有关更多信息，请参阅 [更新部署信息 (Studio)](model-registry-details-studio-deploy.md)。

------
#### [ Studio Classic ]

1. 登录亚马逊 SageMaker Studio 经典版。有关更多信息，请参阅[启动 Amazon SageMaker Studio 经典版](https://docs.aws.amazon.com/sagemaker/latest/dg/studio-launch.html)。

1. 在左侧导航窗格中，选择**主页**图标 (![\[Black square icon representing a placeholder or empty image.\]](http://docs.aws.amazon.com/zh_cn/sagemaker/latest/dg/images/studio/icons/house.png))。

1. 选择**模型**，然后选择**模型注册表**。

1. 从模型组列表中，选择要查看的模型组的名称。

1. 此时将出现一个新选项卡，其中列出了模型组中的模型版本。

1. 在模型版本列表中，选择您要查看其详细信息的模型版本的名称。

1. 在打开的模型版本选项卡上，选择以下选项之一，以查看有关模型版本的详细信息：
   + **活动**：显示模型版本的事件，例如批准状态更新。
   + **模型质量**：报告与 Model Monitor 模型质量检查相关的指标，这些指标将模型预测与 Ground Truth 进行比较。有关 Model Monitor 模型质量检查的更多信息，请参阅[模型质量](model-monitor-model-quality.md)。
   + **可解释性**：报告与 Model Monitor 特征归因检查相关的指标，这些指标比较训练数据与实时数据中特征的相对排名。有关 Model Monitor 可解释性检查的更多信息，请参阅[生产中模型的功能归属漂移](clarify-model-monitor-feature-attribution-drift.md)。
   + **偏差**：报告与 Model Monitor 偏差偏移检查相关的指标，这些指标将比较实时数据与训练数据的分布情况。有关 Model Monitor 偏差偏移检查的更多信息，请参阅[生产中模型的偏压飘移](clarify-model-monitor-bias-drift.md)。
   + **Inference Recommender**：根据您的模型和示例负载提供初始实例建议，以实现出色性能。
   + **负载测试**：当您提供特定的生产要求（如延迟和吞吐量约束）时，针对您选择的实例类型运行负载测试。
   + **推理规范**：显示实时推理和转换作业的实例类型，以及有关 Amazon ECR 容器的信息。
   + **信息**：显示模型版本关联的项目、生成模型的管道、模型组以及模型在 Amazon S3 中的位置等信息。

------

# 添加训练作业 (Studio)
<a name="model-registry-details-studio-training"></a>

**重要**  
截至 2023 年 11 月 30 日，之前的亚马逊 SageMaker Studio 体验现在被命名为 Amazon St SageMaker udio Classic。以下部分专门介绍如何使用更新后的 Studio 体验。有关使用 Studio Classic 应用程序的信息，请参阅 [亚马逊 SageMaker Studio 经典版](studio.md)。

您可以向模型添加一个训练作业，该任务是在外部创建或使用 SageMaker AI 创建的。**如果您添加 SageMaker 训练作业， SageMaker AI 会在 “训练” 选项卡中预填充所有子页面的字段。**如果添加的是外部创建的训练作业，则需要手动添加与训练作业相关的详细信息。

**要在模型软件包中添加训练作业，请完成以下步骤。**

1. 选择**训练**选项卡。

1. 选择**添加**。如果您没有看到此选项，则可能已经附加了训练作业。如果您要删除该训练作业，请完成以下说明以删除训练作业。

1. 您可以添加在 SageMaker AI 中创建的训练作业或在外部创建的训练作业。

   1. 要添加您在 SageMaker AI 中创建的训练作业，请完成以下步骤。

      1. 选择**SageMaker 人工智能**。

      1. 选择要添加的训练作业旁边的单选框。

      1. 选择**添加**。

   1. 要添加外部创建的训练作业，请完成以下步骤。

      1. 选择 **Custom (自定义)**。

      1. 在 **Name** 字段中，插入自定义训练作业的名称。

      1. 选择**添加**。

# 删除训练作业 (Studio)
<a name="model-registry-details-studio-training-remove"></a>

通过完成以下步骤，您可以从模型中移除在外部创建或使用 SageMaker AI 创建的训练作业。

**要从模型软件包中删除训练作业，请完成以下步骤。**

1. 选择**训练**。

1. 选择**训练**标签下的**齿轮** (![\[Black square icon representing a placeholder or empty image.\]](http://docs.aws.amazon.com/zh_cn/sagemaker/latest/dg/images/icons/Settings_squid.png)) 图标。

1. 选择训练作业旁边的**删除**。

1. 选择**是，我想删除<name of your training job>**。

1. 选择**完成**。

# 更新训练作业详情 (Studio)
<a name="model-registry-details-studio-training-update"></a>

完成以下步骤以更新与您的模型关联的训练作业的详细信息，该任务是在外部创建或使用 SageMaker AI 创建的。

**更新（和查看）与训练作业相关的详细信息：**

1. 在**训练**选项卡上，查看训练作业的状态。如果在模型软件包中添加了训练作业，则状态为 `Complete`；如果没有添加，则状态为 `Undefined`。

1. 要查看与训练作业相关的详细信息，如性能、超参数和识别细节，请选择**训练**选项卡。

1. 要更新和查看与模型性能有关的详细信息，请完成以下步骤。

   1. 在**训练**选项卡的左侧边栏中选择**性能**。

   1. 查看与训练作业相关的**指标**。**性能**页面会按名称、值和您添加的相关注释列出指标。

   1. （可选）要为现有指标添加备注，请完成以下步骤。

      1. 选择模型版本页面右上角的垂直省略号，然后选择**编辑**。

      1. 为列出的任何指标添加注释。

      1. 在模型版本页面顶部，选择**正在编辑模型版本...**横幅中的**保存**。

   1. 查看与训练作业相关的**自定义指标**。自定义指标的格式与指标类似。

   1. （可选）要添加自定义指标，请完成以下步骤。

      1. 选择**添加**。

      1. 为新指标插入名称、值和任何可选注释。

   1. （可选）要删除自定义指标，请选择要删除的指标旁边的**垃圾桶**图标。

   1. 在**观察**文本框中，查看您添加的与训练作业相关的备注。

   1. （可选）要添加或更新观察结果，请完成以下步骤。

      1. 选择模型版本页面右上角的垂直省略号，然后选择**编辑**。

      1. 在**观察结果**文本框中添加或更新备注。

      1. 在模型版本页面顶部，选择**正在编辑模型版本...**横幅中的**保存**。

1. 要更新和查看与模型构件相关的详细信息，请完成以下步骤。

   1. 在**训练**选项卡的左侧边栏中选择**构件**。

   1. 在**位置 (S3 URI)**字段中，查看训练数据集的 Amazon S3 位置。

   1. 在**模型**字段中，查看训练作业中包含的其他模型的模型构件的名称和 Amazon S3 位置。

   1. 要更新**构件**页面中的任何字段，请完成以下步骤。

      1. 选择模型版本页面右上方的垂直省略号，然后选择**编辑**。

      1. 在任意字段中输入新值。

      1. 在模型版本页面顶部，选择**正在编辑模型版本...**横幅中的**保存**。

1. 要更新和查看与超参数相关的详细信息，请完成以下步骤。

   1. 在**训练**选项卡的左侧边栏中选择**超参数**。

   1. 查看提供的 SageMaker AI 和定义的自定义超参数。每个超参数都列出了名称和数值。

   1. 查看您添加的自定义超参数。

   1. （可选）要添加额外的自定义超参数，请完成以下步骤。

      1. 在**自定义超参数**表的右上角，选择**添加**。出现一对新的空白字段。

      1. 输入新自定义超参数的名称和值。这些值将自动保存。

   1. （可选）要删除自定义超参数，请选择超参数右侧的**垃圾桶**图标。

1. 要更新和查看与训练作业环境有关的详细信息，请完成以下步骤。

   1. 在**训练**选项卡的左侧边栏中选择**环境**。

   1. 查看 AI（针对训练作业）或您（对于自定义训练作业）添加的任何 SageMaker 训练作业容器的 SageMaker Amazon ECR URI 位置。

   1. （可选）要添加其他训练作业容器，请选择**添加**，然后输入新训练容器的 URI。

1. 要更新和查看训练作业的训练作业名称和 Amazon Resource Names (ARN)，请完成以下步骤。

   1. 在**训练**选项卡的左侧边栏中选择**详情**。

   1. 查看训练作业名称和训练作业的 ARN。

# 添加评估作业 (Studio)
<a name="model-registry-details-studio-evaluate"></a>

**重要**  
截至 2023 年 11 月 30 日，之前的亚马逊 SageMaker Studio 体验现在被命名为 Amazon St SageMaker udio Classic。以下部分专门介绍如何使用更新后的 Studio 体验。有关使用 Studio Classic 应用程序的信息，请参阅 [亚马逊 SageMaker Studio 经典版](studio.md)。

注册模型后，您可以使用一个或多个数据集测试模型，以评测其性能。您可以从 Amazon S3 添加一个或多个评估作业，也可以通过手动输入所有详细信息来定义自己的评估作业。**如果您从 Amazon S3 添加任务， SageMaker AI 会在 “评估” 选项卡中预填充所有子页面的字段。**如果您定义了自己的评估作业，则需要手动添加与评估作业相关的详细信息。

**要在模型软件包中添加第一个评估作业，请完成以下步骤。**

1. 选择**评估**选项卡。

1. 选择**添加**。

1. 您可以从 Amazon S3 添加评估作业或自定义评估作业。

   1. 要从 Amazon S3 添加带附件的评估作业，请完成以下步骤。

      1. 选择 **S3**。

      1. 输入评估作业的名称。

      1. 输入 Amazon S3 位置，以保存评估作业的输出资料。

      1. 选择**添加**。

   1. 要添加自定义评估作业，请完成以下步骤：

      1. 选择 **Custom (自定义)**。

      1. 输入评估作业的名称。

      1. 选择**添加**。

**要在模型软件包中添加额外的评估作业，请完成以下步骤。**

1. 选择**评估**选项卡。

1. 选择**训练**标签下的**齿轮** (![\[Black square icon representing a placeholder or empty image.\]](http://docs.aws.amazon.com/zh_cn/sagemaker/latest/dg/images/icons/Settings_squid.png)) 图标。

1. 在对话框中，选择**添加**。

1. 您可以从 Amazon S3 添加评估作业或自定义评估作业。

   1. 要从 Amazon S3 添加带附件的评估作业，请完成以下步骤。

      1. 选择 **S3**。

      1. 输入评估作业的名称。

      1. 输入 Amazon S3 位置，以保存评估作业的输出资料。

      1. 选择**添加**。

   1. 要添加自定义评估作业，请完成以下步骤：

      1. 选择 **Custom (自定义)**。

      1. 输入评估作业的名称。

      1. 选择**添加**。

# 删除评估作业 (Studio)
<a name="model-registry-details-studio-evaluate-remove"></a>

通过完成以下步骤，您可以从模型中移除外部创建或使用 SageMaker AI 创建的评估任务。

**要从模型软件包中删除评估作业，请完成以下步骤。**

1. 选择**评估**选项卡。

1. 选择**训练**标签下的**齿轮** (![\[Black square icon representing a placeholder or empty image.\]](http://docs.aws.amazon.com/zh_cn/sagemaker/latest/dg/images/icons/Settings_squid.png)) 图标。

1. （可选）要从列表中找到您的评估作业，请在搜索框中输入搜索词，以缩小选择列表的范围。

1. 选择评估作业旁边的单选按钮。

1. 选择**移除 **。

1. 选择**是，我想删除<name of your evaluation job>**。

1. 选择**完成**。

# 更新评估作业 (Studio)
<a name="model-registry-details-studio-evaluate-update"></a>

完成以下步骤以更新与您的模型关联的外部或使用 SageMaker AI 创建的评估任务的详细信息。

**更新（和查看）与评估作业相关的详细信息：**

1. 在**评估**选项卡上，查看评估作业的状态。如果在模型软件包中添加了评估作业，则状态为 `Complete`；如果没有添加，则状态为 `Undefined`。

1. 要查看与评估作业相关的详细信息，如性能和构件位置，请选择**评估**选项卡。

1. 要在评估过程中更新和查看与模型性能相关的详细信息，请完成以下步骤。

   1. 在**评估**选项卡侧边栏中选择**性能**。

   1. 在**指标**列表中查看与评估作业相关的指标。在**指标**列表中，按名称、值和您添加的相关注释显示各个指标。

   1. 在**观察**文本框中，查看您添加的与评估作业相关的任何备注。

   1. 要更新任何指标的**注释**字段或**观察**字段，请完成以下步骤。

      1. 选择模型版本页面右上方的垂直省略号，然后选择**编辑**。

      1. 为任何指标或在**观察**文本框中输入注释。

      1. 在模型版本页面顶部，选择**正在编辑模型版本...**横幅中的**保存**。

1. 要更新和查看与评估作业数据集相关的详细信息，请完成以下步骤。

   1. 在**评估**页面的左侧边栏选择**构件**。

   1. 查看评估作业中使用的数据集。

   1. （可选）要添加数据集，请选择**添加**，然后输入数据集的 Amazon S3 URI。

   1. （可选）要删除数据集，请选择要删除的数据集旁边的**垃圾桶**图标。

1. 要查看任务名称和评估作业 ARN，请选择**详情**。

# 更新审计（治理）信息 (Studio)
<a name="model-registry-details-studio-audit"></a>

**重要**  
截至 2023 年 11 月 30 日，之前的亚马逊 SageMaker Studio 体验现在被命名为 Amazon St SageMaker udio Classic。以下部分专门介绍如何使用更新后的 Studio 体验。有关使用 Studio Classic 应用程序的信息，请参阅 [亚马逊 SageMaker Studio 经典版](studio.md)。

记录重要的模型细节，帮助企业建立健全的模型管理框架。您和您的团队成员可以参考这些详细信息，以便将模型用于适当的使用场景，了解模型的业务领域和所有者，并了解模型风险。您还可以保存有关模型预期性能和性能限制原因的详细信息。

**要查看或更新与模型管理相关的详细信息，请完成以下步骤。**

1. 在**审查**选项卡上，查看模型卡的审批状态。状态可以是以下之一：
   + **草稿**：模型卡仍然是草稿。
   + **等待批准**：模型卡正在等待审批。
   + **已批准**：模型卡已获批准。

1. 要更新模型卡的审批状态，请选择审批状态旁边的下拉菜单，并选择更新后的审批状态。

1. 要更新和查看与模型软件包风险有关的详细信息，请完成以下步骤。

   1. 在**审核**选项卡的左侧边栏选择**风险**。

   1. 查看当前的风险评级和对风险评级的解释。

   1. 要更新评级或解释，请完成以下步骤。

      1. 选择**审核**页面右上角的垂直省略号，然后选择**编辑**。

      1. （可选）选择更新的风险评级。

      1. （可选）更新风险评级解释。

      1.  在模型版本页面顶部，选择**正在编辑模型版本...**横幅中的**保存**。

1. 要更新和查看与模型软件包使用情况有关的详细信息，请完成以下步骤。

   1. 在**审核**选项卡的左侧边栏选择**使用**。

   1. 查看您在以下字段中添加的文本：
      + **问题类型**：用于构建模型的机器学习算法类别。
      + **算法类型**：用于创建模型的特定算法。
      + **预期用途**：模型在您的业务问题中的当前应用。
      + **影响模型功效的因素**：关于模型性能限制的说明。
      + **推荐使用**：您可以使用模型创建的应用程序类型、您可以期望获得合理性能的场景或使用模型的数据类型。
      + **伦理考虑**：描述您的模型可能如何基于年龄或性别等因素进行歧视。

   1. 要更新前面列出的任何字段，请完成以下步骤。

      1. 选择模型版本页面右上角的垂直省略号，然后选择**编辑**。

      1. （可选）如果需要，使用**问题类型**和**算法类型**的下拉菜单选择新值。

      1. （可选）更新其余字段的文本描述。

      1.  在模型版本页面顶部，选择**正在编辑模型版本...**横幅中的**保存**。

1. 要更新和查看与模型软件包利益相关者有关的详细信息，请完成以下步骤。

   1. 在**审核**选项卡的左侧边栏中选择**利益相关者**。

   1. 查看当前模型的所有者和创建者（如果有）。

   1. 要更新模型所有者或创建者，请完成以下步骤：

      1. 选择模型版本页面右上角的垂直省略号，然后选择**编辑**。

      1. 更新模型所有者或模型创建者字段。

      1.  在模型版本页面顶部，选择**正在编辑模型版本...**横幅中的**保存**。

1. 要更新和查看与模型软件包解决的业务问题相关的详细信息，请完成以下步骤。

   1. 在**审计**选项卡的左侧边栏选择**业务**。

   1. 查看模型所针对的业务问题、业务问题利益相关者和业务范围的当前描述（如有）。

   1. 要更新**业务**标签中的任何字段，请完成以下步骤。

      1. 选择模型版本页面右上角的垂直省略号，然后选择**编辑**。

      1. 更新任何字段中的描述。

      1.  在模型版本页面顶部，选择**正在编辑模型版本...**横幅中的**保存**。

1. 要更新和查看模型的现有文档（表示为键值对），请完成以下步骤。

   1. 在**审核**页面的左侧边栏选择**文件**。

   1. 查看现有键值对。

   1. 要添加任何键值对，请完成以下步骤。

      1. 选择模型版本页面右上角的垂直省略号，然后选择**编辑**。

      1. 选择**添加**。

      1. 输入新键和相关值。

      1.  在模型版本页面顶部，选择**正在编辑模型版本...**横幅中的**保存**。

   1. 要删除任何键值对，请完成以下步骤。

      1. 选择模型版本页面右上角的垂直省略号，然后选择**编辑**。

      1. 选择要删除的键值对旁边的**垃圾桶**图标。

      1.  在模型版本页面顶部，选择**正在编辑模型版本...**横幅中的**保存**。

# 更新部署信息 (Studio)
<a name="model-registry-details-studio-deploy"></a>

**重要**  
截至 2023 年 11 月 30 日，之前的亚马逊 SageMaker Studio 体验现在被命名为 Amazon St SageMaker udio Classic。以下部分专门介绍如何使用更新后的 Studio 体验。有关使用 Studio Classic 应用程序的信息，请参阅 [亚马逊 SageMaker Studio 经典版](studio.md)。

在评估模型性能并确定它已准备好用于生产工作负载之后，您可以更改模型的批准状态以启动 CI/CD 部署。有关批准状态定义的更多信息，请参阅 [更新模型的批准状态](model-registry-approve.md)。

**要查看或更新与模型软件包部署相关的详细信息，请完成以下步骤。**

1. 在**部署**选项卡上，查看模型软件包批准状态。可能的值如下：
   + **待批准**：模型已注册，但尚未批准或拒绝部署。
   + **已批准**：已批准该模型用于 CI/CD 部署。如果存在在模型批准事件时启动模型部署的 EventBridge 规则（例如基于 SageMaker AI 项目模板构建的模型），A SageMaker I 也会部署该模型。
   + **拒绝**：拒绝部署该模型。

   如果您需要更改审批状态，请选择状态旁边的下拉菜单，然后选择更新的状态。

1. 要更新模型软件包的审批状态，请选择审批状态旁边的下拉菜单，然后选择更新后的审批状态。

1. 在**容器**列表中，查看推理映像容器。

1. 在**实例**列表中，查看组成部署端点的实例。