Modèles SageMaker de cartes Amazon - Amazon SageMaker

Les traductions sont fournies par des outils de traduction automatique. En cas de conflit entre le contenu d'une traduction et celui de la version originale en anglais, la version anglaise prévaudra.

Modèles SageMaker de cartes Amazon

Important

Amazon SageMaker Model Card est intégré au SageMaker Model Registry. Si vous enregistrez un modèle dans Model Registry, vous pouvez utiliser l'intégration pour ajouter des informations d'audit. Pour de plus amples informations, veuillez consulter Afficher et mettre à jour les détails d'une version de modèle.

Utilisez Amazon SageMaker Model Cards pour documenter les détails essentiels de vos modèles d'apprentissage automatique (ML) en un seul endroit afin de rationaliser la gouvernance et les rapports.

Les détails du catalogue tels que l'utilisation prévue et l'évaluation des risques d'un modèle, les détails et les mesures de l'entraînement, les résultats de l'évaluation et les observations, ainsi que des rappels supplémentaires tels que des considérations, des recommandations et des informations personnalisées. En créant des fiches modèles, vous pouvez :

  • Fournir des conseils sur la façon dont un modèle doit être utilisé.

  • Soutenir les activités d'audit avec des descriptions détaillées de l'entraînement et des performances des modèles.

  • Expliquer comment un modèle est destiné à soutenir les objectifs commerciaux.

Les fiches modèles fournissent des conseils prescriptifs sur les informations à documenter et incluent des champs permettant d'ajouter des informations personnalisées. Après avoir créé un modèle de carte, vous pouvez l'exporter vers un PDF ou le télécharger pour le partager avec les parties prenantes concernées. Toute modification autre qu'une mise à jour du statut d'approbation apportée à une fiche modèle entraîne la création de versions supplémentaires de la fiche modèle, ce qui permet de disposer d'un enregistrement immuable des modifications apportées au modèle.

Prérequis

Pour commencer à utiliser Amazon SageMaker Model Cards, vous devez être autorisé à créer, modifier, afficher et exporter des modèles de cartes.

Utilisations prévues d'un modèle

La spécification des utilisations prévues d'un modèle permet de garantir que les développeurs et les utilisateurs du modèle disposent des informations dont ils ont besoin pour former ou déployer le modèle de manière responsable. Les utilisations prévues d'un modèle doivent décrire les scénarios dans lesquels il est approprié d'utiliser le modèle ainsi que ceux dans lesquels il n'est pas recommandé de l'utiliser.

Nous vous recommandons d'inclure :

  • L'objectif général du modèle

  • Les cas d'utilisation auxquels le modèle était destiné

  • Les ces cas d'utilisation auxquels le modèle n'était pas destiné

  • Les hypothèses formulées lors de l'élaboration du modèle

Les utilisations prévues d'un modèle vont au-delà des détails techniques et décrivent la manière dont un modèle doit être utilisé en production, les scénarios dans lesquels il est approprié de l'utiliser et des considérations supplémentaires telles que le type de données à utiliser avec le modèle ou toute hypothèse formulée au cours du développement.

Évaluations de risque

Les développeurs créent des modèles de machine learning pour des cas d'utilisation présentant différents niveaux de risque. Par exemple, un modèle qui approuve les demandes de prêt peut présenter un risque supérieur à celui d'un modèle qui détecte la catégorie d'un e-mail. Compte tenu de la diversité des profils de risque d'un modèle, les fiches modèles fournissent un champ vous permettant de classer le niveau de risque d'un modèle.

Cette note de risque peut être unknown, low, medium ou high. Utilisez ces champs d'évaluation des risques pour étiqueter les modèles à risque inconnu, faible, moyen ou élevé, et ainsi aider votre organisation à se conformer aux règles existantes concernant la mise en production de certains modèles.

JSONSchéma de carte modèle

Les détails de l'évaluation d'un modèle de carte doivent être fournis sous JSON format. Si vous disposez de rapports d'évaluation de JSON format existants générés par SageMaker SageMaker Clarify ou Model Monitor, téléchargez-les sur Amazon S3 et fournissez un S3 URI pour analyser automatiquement les métriques d'évaluation. Pour plus d'informations et des exemples de rapports, consultez le dossier d'exemples de métriques dans le carnet d'exemples Amazon SageMaker Model Governance - Model Cards.

Lorsque vous créez une carte modèle à l'aide de SageMaker PythonSDK, le contenu du modèle doit se trouver dans le JSON schéma de la carte modèle et fourni sous forme de chaîne. Fournissez un contenu de modèle similaire à l'exemple ci-dessous.

{ "$schema": "http://json-schema.org/draft-07/schema#", "$id": "http://json-schema.org/draft-07/schema#", "title": "SageMakerModelCardSchema", "description": "Default model card schema", "version": "0.1.0", "type": "object", "additionalProperties": false, "properties": { "model_overview": { "description": "Overview about the model", "type": "object", "additionalProperties": false, "properties": { "model_description": { "description": "description of model", "type": "string", "maxLength": 1024 }, "model_owner": { "description": "Owner of model", "type": "string", "maxLength": 1024 }, "model_creator": { "description": "Creator of model", "type": "string", "maxLength": 1024 }, "problem_type": { "description": "Problem being solved with the model", "type": "string" }, "algorithm_type": { "description": "Algorithm used to solve the problem", "type": "string", "maxLength": 1024 }, "problem_type": { "description": "Problem being solved with the model", "type": "string" }, "model_owner": { "description": "Owner of model", "type": "string", "maxLength": 1024 } }, "model_id": { "description": "SageMaker Model Arn or Non SageMaker Model id", "type": "string", "maxLength": 1024 }, "model_artifact": { "description": "Location of the model artifact", "type": "array", "maxContains": 15, "items": { "type": "string", "maxLength": 1024 } }, "model_name": { "description": "Name of the model", "type": "string", "maxLength": 1024 }, "model_version": { "description": "Version of the model", "type": "number", "minimum": 1 }, "inference_environment": { "description": "Overview about the inference", "type": "object", "additionalProperties": false, "properties": { "container_image": { "description": "SageMaker inference image uri", "type": "array", "maxContains": 15, "items": { "type": "string", "maxLength": 1024 } } } } } }, "model_package_details": { "description": "Metadata information related to model package version", "type": "object", "additionalProperties": false, "properties": { "model_package_description": { "description": "A brief summary of the model package", "type": "string", "maxLength": 1024 }, "model_package_arn": { "description": "The Amazon Resource Name (ARN) of the model package", "type": "string", "minLength": 1, "maxLength": 2048 }, "created_by": { "description": "Information about the user who created model package.", "type": "object", "additionalProperties": false, "properties": { "user_profile_name": { "description": "The name of the user's profile in SageMaker Studio", "type": "string", "maxLength": 63 } } }, "model_package_status": { "description": "Current status of model package", "type": "string", "enum": [ "Pending", "InProgress", "Completed", "Failed", "Deleting" ] }, "model_approval_status": { "description": "Current approval status of model package", "type": "string", "enum": [ "Approved", "Rejected", "PendingManualApproval" ] }, "approval_description": { "description": "A description provided for the model approval", "type": "string", "maxLength": 1024 }, "model_package_group_name": { "description": "If the model is a versioned model, the name of the model group that the versioned model belongs to.", "type": "string", "minLength": 1, "maxLength": 63 }, "model_package_name": { "description": "Name of the model package", "type": "string", "minLength": 1, "maxLength": 63 }, "model_package_version": { "description": "Version of the model package", "type": "number", "minimum": 1 }, "domain": { "description": "The machine learning domain of the model package you specified. Common machine learning domains include computer vision and natural language processing.", "type": "string" }, "task": { "description": "The machine learning task you specified that your model package accomplishes. Common machine learning tasks include object detection and image classification.", "type": "string" }, "source_algorithms": { "description": "A list of algorithms that were used to create a model package.", "$ref": "#/definitions/source_algorithms" }, "inference_specification": { "description": "Details about inference jobs that can be run with models based on this model package.", "$ref": "#/definitions/inference_specification" } } }, "intended_uses": { "description": "Intended usage of model", "type": "object", "additionalProperties": false, "properties": { "purpose_of_model": { "description": "Why 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": "What business problem does the model solve?", "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 the model will optimize for", "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": "Any ethical considerations that the author wants to provide", "type": "string", "maxLength": 2048 }, "caveats_and_recommendations": { "description": "Caveats and recommendations for people who might use this model in their applications.", "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 an algorithm that was used to create the model package. The algorithm must be either an algorithm resource in your SageMaker account or an algorithm in AWS Marketplace that you are subscribed to.", "type": "string", "maxLength": 170 }, "model_data_url": { "description": "The 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 which were used to create model package.", "type": "array", "minContains": 1, "maxContains": 15, "items": { "type": "object", "additionalProperties": false, "required": [ "image" ], "properties": { "model_data_url": { "description": "The 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 EC2 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 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 in section", "type": "string", "maxLength": 1024 }, "objective_function": { "description": "objective function that training job is optimized for", "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 hyper parameter", "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 } } }