Exam Room · AI Practitioner

Cheat Sheet: ML Fundamentals and the SageMaker Suite

· 21 min read

AI Fundamentals · part of The Exam Room

A fast pass over the ML fundamentals and SageMaker services this track assumes as background and the AIP-C01 track above it never re-teaches.

Fundamentals at a glance

Thing What it is Reach for it when
Regression Labelled data, continuous target Predicting a number: price, demand, a delivery time
Classification Labelled data, categorical target Predicting a label: fraud or not, which tier
Clustering Unlabelled data, grouping Finding structure with no target to predict
Semi-supervised learning A small labelled set plus a large unlabelled one Labels are expensive and scarce, but raw data is plentiful
Self-supervised learning Labels derived from the data itself Foundation-model pre-training; no human labelling at all
Reinforcement learning A reward signal from an environment An agent learns by acting and being scored, not from fixed examples
RLHF Human preference rankings train a reward model Aligning a model’s responses to what people actually prefer
Transfer learning A pre-trained model adapted with a small labelled set You want a head start rather than training from nothing
Overfitting Train loss falls, validation loss rises Too much capacity or too few examples for the model to generalise
Underfitting Both losses stay high Too little capacity, too few epochs, or too low a learning rate
Data drift The input distribution shifts over time Same relationship between input and target, different inputs arriving
Concept drift The input-to-target relationship changes over time The same inputs now deserve a different answer
Training-serving skew A pipeline mismatch between training and serving Degradation shows up immediately, not gradually like the other two

The SageMaker suite at a glance

Service Job Reach for it when
Ground Truth Labels training data You need a labelled dataset built before training starts
Augmented AI (A2I) Routes production predictions to a human reviewer A live prediction needs a person to check it before it acts
Clarify Bias metrics before and after training, plus SHAP explainability You need to measure bias in data or a model, or attribute a prediction to its features
Model Monitor Watches a live endpoint for drift You need continuous production monitoring, not a one-off check
Model Cards Human-written documentation: intended use, limits, eval results You need to record and communicate what a model is for
Model Registry A version catalogue with approval status You need to gate what gets promoted into a CI/CD pipeline
Feature Store One ingestion, two reads You need the same features served at millisecond latency and pulled for training history
Pipelines ML CI/CD orchestration You need to automate the steps from data to deployed model
JumpStart A model hub you deploy onto your own endpoints and instances You want a pre-built model but need instance choice or your own VPC
Canvas No-code ML A business user needs to build a model without writing code
Data Wrangler Visual data preparation You need to clean and transform data without a notebook
Trainium Purpose-built training silicon You are training a large model and want the cost-efficient chip for it
Inferentia Purpose-built inference silicon You are serving a large model and want the cost-efficient chip for it
Real-time inference An always-on endpoint Traffic is steady and needs low, consistent latency
Serverless inference Scales to zero between requests Traffic is intermittent and cold starts are acceptable
Asynchronous inference A queue in front of the endpoint Payloads are large or processing is slow, and nobody is waiting live
Batch transform Scores a whole dataset offline, no endpoint You are scoring data once with no live traffic at all

Deployment strategies at a glance

Strategy Shape Reach for it when
Shadow A copy of live traffic runs the new version with zero user exposure You want a pure comparison before anyone is at risk
Canary A small percentage of real users hit the new version You want to expand gradually once the small slice looks healthy
Blue/green Two full parallel environments, one cutover You want an instant, whole-scale switch and an instant rollback
A/B Traffic is deliberately split to compare outcomes You are running an experiment, not a rollout

Decision rules

  • If you have hyperparameters (epochs, learning rate, batch size), those are set before training; if you have inference parameters (temperature, top-p, top-k), those are set per request. Confusing the two is a classic distractor.
  • Work the ML lifecycle as a loop, not a line: business goal, collect, prepare and explore, engineer features, train, tune, evaluate, deploy, monitor, and back to collect when monitoring finds a gap.
  • If you want zero user exposure while comparing a new model, use shadow; if you want to expand gradually into real traffic, use canary; if you want an instant whole-scale switch with an instant rollback, use blue/green; if you are deliberately comparing outcomes rather than rolling something out, that is an A/B test.
  • If the target is a number, that is regression; if it is a category, that is classification; if there is no target at all, that is clustering.
  • If labels are scarce but raw data is not, use semi-supervised learning rather than waiting for a fully labelled set.
  • If you are pre-training a foundation model, the labels come from the data itself; that is self-supervised learning, and nobody hand-labels anything.
  • If you want a model to prefer certain responses by human judgement, that is RLHF, and it is a training technique, not an evaluation method.
  • If validation loss rises while training loss keeps falling, you are overfitting; cut epochs, add data, or regularise.
  • If both losses stay stubbornly high, you are underfitting; add capacity, train longer, or raise the learning rate.
  • If a model that was fine yesterday is wrong more often today and the inputs still look the same shape, suspect concept drift before blaming the pipeline.
  • If a model is wrong from the day it deployed, suspect training-serving skew, not drift; drift takes time to appear, skew does not.
  • If you need training data labelled, use Ground Truth; if you need a live prediction checked by a person before it acts, use A2I. They sit on opposite sides of deployment.
  • If you need to measure bias or explain a prediction, use Clarify; if you need to watch a live endpoint keep behaving the same way, use Model Monitor.
  • If you need to document what a model is for, write a Model Card; if you need to gate what gets promoted to production, use the Model Registry. Documentation is not a deployment gate.
  • If a model needs to serve at millisecond latency and also be pulled for training history, use Feature Store’s online and offline stores from one ingestion.
  • If you want a pre-built model but need to pick the instance type or keep it inside your own VPC, use JumpStart; a fully managed API surface gives you neither.
  • If a business user needs a model with no code, point them at Canvas, not a notebook.
  • If traffic is steady, use a real-time endpoint; if it is intermittent, use serverless and accept the cold starts; if payloads are large or slow, use asynchronous inference; if there is no live traffic at all, use batch transform.

Traps

  • Confusing self-supervised learning with unsupervised learning. Self-supervised still trains against a target; the target is just derived automatically from the data, not hand-labelled.
  • Treating RLHF as an evaluation technique. It trains a reward model from preference data; it does not measure anything after the fact.
  • Assuming drift is always gradual. Training-serving skew is a pipeline bug, not a drift phenomenon, and it shows up on day one.
  • Mixing up which drift is which: data drift is the inputs changing shape; concept drift is the correct answer for the same inputs changing. Same symptom, different cause.
  • Picking Ground Truth when the question is about a live prediction, or A2I when the question is about building a training set. The clue is always which side of deployment the data sits on.
  • Treating a Model Card as something that blocks a release. It documents; the Model Registry’s approval status is what actually gates a pipeline.
  • Assuming Clarify and Model Monitor do the same job because both mention bias. Clarify measures it in the data before training and in the model after; Model Monitor watches for it continuously once the model is live.
  • Reaching for a real-time endpoint out of habit when traffic is genuinely bursty and idle time is long; that is what serverless is for, cold starts and all.
  • Forgetting that batch transform has no persistent endpoint at all; it is not a cheaper real-time option, it is a different shape of job.
  • Treating an A/B test as a rollout mechanism. It is an experiment to compare outcomes; shadow, canary, and blue/green are the ways you actually roll something out.
  • Reaching for blue/green when the real ask is gradual exposure, or canary when the real ask is an instant whole-scale cutover; the shape of the risk decides which one fits.

Say it in one line

  1. Labelled and continuous means regression, labelled and categorical means classification, unlabelled means clustering.
  2. Self-supervised learning derives its own labels from the data; that is how foundation models pre-train.
  3. RLHF trains a reward model from human preference rankings; it is a training step, not a measurement.
  4. Overfitting shows as rising validation loss against falling training loss; underfitting shows as both staying high.
  5. Data drift is the inputs changing, concept drift is the correct answer changing, and training-serving skew is a pipeline bug that bites from day one.
  6. Ground Truth labels training data; A2I reviews production predictions. Different side of deployment, different job.
  7. Clarify measures bias and explains predictions; Model Monitor watches a live endpoint keep behaving the same way over time.
  8. Model Cards document; the Model Registry’s approval status gates what actually ships.
  9. Feature Store serves the same features at millisecond latency online and as training history offline, from one ingestion.
  10. Pipelines orchestrate ML CI/CD; JumpStart deploys a pre-built model onto your own instances; Canvas is no-code; Data Wrangler is visual prep.
  11. Trainium trains, Inferentia infers.
  12. Real-time is always-on, serverless scales to zero with cold starts, asynchronous queues large payloads, and batch transform scores offline with no endpoint at all.
  13. Hyperparameters are set before training; inference parameters are set per request.
  14. The ML lifecycle is a loop: goal, collect, prepare, engineer, train, tune, evaluate, deploy, monitor, and back to collect.
  15. Shadow exposes nobody, canary exposes a slice, blue/green cuts over wholesale, and A/B is an experiment rather than a rollout.

These posts are LLM-aided. Backbone, original writing, and structure by Craig. Research and editing by Craig + LLM. Proof-reading by Craig.