ML pipelines, governance and cost
Repeatable ML pipelines
MLOps applies repeatable engineering and operational controls to models and data. SageMaker AI Pipelines represents dependent steps as a directed acyclic graph: prepare data, train, evaluate, conditionally register a model, approve and deploy through a controlled release process. The Model Registry records model package versions and metadata; registration is not permission to serve traffic. Keep dataset hashes, container digests, code commits, evaluation results and approval records together. Retry only bounded, repeatable steps; do not silently reuse stale artifacts.
Governance and privacy
Use separate least-privilege execution and approval roles. Restrict S3 prefixes, artifact storage and KMS key use; protect network access and audit model promotion. Document intended use, excluded use, feature provenance, limitations and group error rates in a model card. A group recall gap may be due to sampling or genuine model problems; investigate with sufficient representative data and human oversight. Do not equate an approval flag with compliance or remove data retention controls. Avoid loading untrusted serialized model artifacts.
Estimate cost before running
Estimate provisioned training as instance count times running hours times hourly rate; add processing, storage, network transfer and observability. GPU rates and distributed overhead can dominate. A hypothetical two-instance training job for 3 hours at $2 per instance-hour costs $12 in compute; a persistent single endpoint at $0.40/hour over 24 hours costs $9.60 even if idle. These are invented rates, not AWS quotes. Serverless and other inference modes use different billing dimensions, including duration, provisioned capacity or tokens where applicable. Compare current regional prices and quotas before authorization.
Approval and cleanup practice
Require minimum recall, bounded group gap, approved provenance, privacy review, latency and budget checks before promotion. Missing evidence blocks release. In the local fixture, a candidate with recall 0.75 passes the recall floor of 0.70 but fails the illustrative group-gap threshold of 0.20. Do not deploy it. For an optional authorized cloud exercise, cap job runtime and instance count; stop notebooks and experiments, delete unused endpoints, inspect residual endpoint configurations, models, storage and logs, and retain required audit evidence. Budget alerts are not hard spending caps. Do not create any AWS resource for this lab.
{ "recall_floor": 0.7, "gap_ceiling": 0.2, "latency_ms": 180, "latency_ceiling": 200, "cost": 12, "budget": 15, "provenance": true, "privacy": true, "approval": true}Check Your Understanding
Solidify your learning with the interactive assessment directly below this lesson.
Concept Quiz & Questions
ML pipelines, governance and cost — knowledge check
Reason about ML evaluation, inference and controlled release.
What does model registration alone establish?
What is the hypothetical compute cost of 2 instances for 3 hours at $2/hour each?
What should happen if a required approval is missing?
Which record helps reproduce a training run?
Which cleanup approach is appropriate?