MODELCATALOG

Register & govern

Register & govern

Model Registry

Adds versioning, approval and promotion controls around model artifacts.

Inputs

artifact + serving image/spec + metrics + lineage

Outputs

versioned model package with approval state

Core explanation

Registry gives me a governed promotion point between experimentation and production deployment.

01

Mental model

What this means before worrying about syntax.

Register candidate versions, attach metadata and metrics, use approval states and promote the selected model into deployment.

  • Registry stores governed candidate versions; it does not train or serve them.
  • A model version should point to evidence: artifact, metrics, lineage and approval state.
  • Deployment should target an immutable version, not a vague latest model.
Lifecycle position
candidate artifact -> model package/version -> approval -> deployment
02

Implementation anatomy

The sequence you would actually build or configure.

  1. 1

    Create logical model/package group.

  2. 2

    Register candidate artifact.

  3. 3

    Attach evaluation metadata.

  4. 4

    Set approval state.

  5. 5

    Promote approved version through deployment workflow.

  6. 6

    Keep rollback target/history.

Objects / terms worth remembering
Model PackageModel Package Groupapproval statuslineage
03

Concrete example

A real model-development or production flow.

1

ComplaintClassifier v17: TF-IDF LR, macro F1 .91, PendingManualApproval

↓
2

v18: transformer, macro F1 .93, higher p95 latency

↓
3

Review selects v17 because quality gain does not justify latency/cost

04

Implementation lab

Concrete code, data manipulation and configuration for this lifecycle step.

01

Register via boto3 when you want the service-level mechanics to be explicit

python

Using boto3 here is useful learning: the governed version references an inference container + model artifact and starts in an approval state.

import boto3

sm = boto3.client("sagemaker")

resp = sm.create_model_package(
    ModelPackageGroupName="ComplaintClassifier",
    ModelPackageDescription="TF-IDF logistic regression candidate",
    InferenceSpecification={
        "Containers": [{
            "Image": INFERENCE_IMAGE_URI,
            "ModelDataUrl": MODEL_ARTIFACT_S3_URI,
        }],
        "SupportedContentTypes": ["application/json"],
        "SupportedResponseMIMETypes": ["application/json"],
        "SupportedRealtimeInferenceInstanceTypes": [
            "ml.m5.large", "ml.m5.xlarge"
        ],
    },
    ModelApprovalStatus="PendingManualApproval",
)

model_package_arn = resp["ModelPackageArn"]
print(model_package_arn)
02

Promote a reviewed version

python
sm.update_model_package(
    ModelPackageArn=model_package_arn,
    ModelApprovalStatus="Approved",
    ApprovalDescription=(
        "Passed macro-F1, category recall, latency and "
        "auto-route error-rate gates."
    ),
)

Design decisions that matter

  • Who can approve.
  • Required evidence.
  • Environment promotion model.
  • Rollback/version retention.

Common failure modes

  • Registry approval does not itself deploy.
  • Newer version is not automatically better.
  • Missing lineage weakens reproducibility/governance.

Production readiness check

Items to close before treating this step as production-ready.

✓ metrics✓ artifact URI✓ data/code lineage✓ approval status✓ owner✓ risk tier✓ rollback version