Lesson 5 of 5 Compliance, Auditing and AI Safeguards

Governing Models with Model Cards and Lineage Tracking

This lesson explains how SageMaker Model Cards, lineage tracking and the model dashboard document what each model is for, how it was built and evaluated, and how it relates to data and other artefacts.

Learning outcomes

After completing this lesson, you will be able to:

  • Document models with SageMaker Model Cards.
  • Trace relationships with ML Lineage Tracking.
  • Oversee models across an account with the Model Dashboard.

SageMaker Model Cards

A model card documents a model in a standard structure: intended uses and limitations, business details, training details (data, algorithm, hyperparameters), evaluation results, bias and explainability findings, risk rating and ethical considerations. Cards can be created from the Model Registry with information filled in automatically, versioned, exported as PDF for reviewers and attached to model package versions, so documentation travels with the model.

Select all that apply

What a model card holds

Exam skills 4.3.4

Identify the information a SageMaker Model Card records.

Log in to try this activity Interactive activities are free with an account.

Lineage tracking

SageMaker ML Lineage Tracking records entities (datasets, processing and training jobs, models, endpoints) and the relationships between them. Pipelines create lineage automatically. Queries answer questions such as "which endpoints use models trained on this dataset?", which matters when a dataset must be withdrawn because of a privacy request or a data quality problem.

The following diagram shows the lineage paths from the dataset to the endpoints.

Finding every model affected by the withdrawn March dataset. A lineage query from the dataset's S3 artefact returns the processing and training jobs that used it and the model packages they produced, and lineage then leads to the endpoints serving those packages. The affected model cards are updated, and the models are retrained on cleaned data through the pipeline.
Job, package and endpoint names are illustrative.
True or false

Lineage tracking

Exam skills 4.3.4 · 3.3.6

Check what ML lineage tracking records.

Log in to try this activity Interactive activities are free with an account.

Oversight across models

The SageMaker Model Dashboard lists all models, endpoints, monitoring schedules, violations and model cards in an account. Combined with CloudTrail, AWS Config, invocation logging and approval workflows in the Model Registry, it provides the evidence that governance programmes and responsible AI policies require. The following table summarises the tools.

NeedTool
Document intended use, risks and evaluationsSageMaker Model Cards
Trace a model to its data and jobsML Lineage Tracking
Approve models before deploymentModel Registry approval status
Overview of all models and their monitoringSageMaker Model Dashboard
Evidence of configuration complianceAWS Config
Worked example

Withdrawing a dataset

A data supplier informs a company that a dataset delivered in March contained records without valid consent. The company must find and retrain every affected model.

  • Query lineage for the dataset's S3 artefact to find processing jobs, training jobs and model packages that used it.
  • Follow lineage to endpoints currently serving those model packages.
  • Update the affected model cards with the issue, retrain on cleaned data through the pipeline and deploy replacements.

Without lineage, the team would have to inspect every pipeline and notebook by hand, with no certainty that all affected models had been found.

Check yourself

How can you find which models used a particular dataset?

Show answer

With SageMaker ML Lineage Tracking.

Exam Tips

Remember for the exam

  • Document intended use, risks and evaluation: SageMaker Model Cards.
  • Which models used this dataset: ML Lineage Tracking.
  • Overview of all models and monitors: SageMaker Model Dashboard.
  • Attach model cards to Model Registry versions.
  • Governance evidence combines cards, lineage, approvals, CloudTrail and Config.