Pick the simplest model that works, then train it well

Module 3 of a visual study guide for the AWS Certified Machine Learning Engineer – Associate (MLA‑C02) exam: framing the problem, choosing an algorithm, running SageMaker training jobs, handling rare classes, tracking experiments, and keeping training secure and cheap. Colors run from teal (simple, cheap) to red (complex, costly).

AI serviceBuilt‑in algorithmScript ModeOwn containerDistributed
Less to build and maintainMore control, more cost
Exam versionThese notes follow MLA‑C02 (the English MLA‑C01 exam ended on September 28, 2026). This module covers Domain 2: Task 2.1 (choose a modeling approach) and Task 2.2 (train and customize), plus experiment tracking from Task 2.3. MLA‑C02 adds foundation models to both tasks; the Deep dives section covers them. Hyperparameter tuning and evaluation get their own module next.
Cheatsheet

Everything to recall on one screen

Each line maps an exam phrase to the answer it usually points to.

If the question says… pick

“Tabular data, classification or regression, best accuracy”XGBoost (also LightGBM, CatBoost)
“Fast, cheap baseline; interpretable coefficients”Linear Learner
“Huge, sparse one‑hot data; click or recommendation”Factorization Machines
“Anomalies without labels”Random Cut Forest
“Unusual IP address for this user”IP Insights
“Group similar items, no labels”K‑Means
“Too many correlated features”PCA
“Forecast many related time series”DeepAR
“Word vectors or fast text classification”BlazingText
“Topics in documents”LDA or NTM
“Translate or summarize sequences”Seq2Seq (or a foundation model)
“Label, box or mask objects in images”Image Classification, Object Detection, Semantic Segmentation
“Extract text and tables from scanned forms”Amazon Textract, not a custom model
“Custom loss, custom architecture, standard framework”Script Mode (PyTorch, TensorFlow, scikit‑learn)
“Library or runtime no AWS container provides”Bring your own container (ECR image)
“Positive class under 1%”scale_pos_weight or class weights; score with PR‑AUC
“Mistakes cost different amounts per row”Sample weights (XGBoost csv_weights=1)
“Validation set has almost no positives”Stratified split or StratifiedKFold
“Track parameters, metrics and artifacts for every run”MLflow on SageMaker (managed MLflow)
“Cut training cost up to 90%”Managed Spot Training + checkpoints
“Container must not reach the internet or AWS APIs”enable_network_isolation=True
“Training must reach data in private subnets”VPC config (subnets + security groups) and VPC endpoints
“Encrypt traffic between training nodes”encrypt_inter_container_traffic=True
“Dataset too big or slow for one machine”Data parallelism
“Model doesn’t fit in one GPU’s memory”Model parallelism
“Find the CPU, GPU or memory bottleneck”CloudWatch training metrics (Debugger is closed to new customers)
“Validation loss rises while training loss falls”Overfitting: early stopping, regularization, simpler model

Numbers and paths

  • scale_pos_weight ≈ negatives / positives; at 0.5% fraud that is about 199
  • Built‑in XGBoost CSV: label in column 1, no header
  • Data channels: /opt/ml/input/data/<channel> (env SM_CHANNEL_TRAIN)
  • Model output: /opt/ml/model (env SM_MODEL_DIR) → model.tar.gz in S3
  • Checkpoints: /opt/ml/checkpoints synced to checkpoint_s3_uri
  • Spot: max_wait ≥ max_run; no automatic fallback to on‑demand
  • Steps per epoch = training rows / batch size

Rare classes in one breath

  • Don’t judge by accuracy; use PR‑AUC, recall, precision, F1
  • Weight the rare class first; resample only the training set
  • Stratify every split (or split by time, stratified within)
  • Pick the decision threshold after training, from business costs

Training security in one breath

  • Execution role: read the input prefix, write the output prefix, nothing more
  • volume_kms_key and output_kms_key for customer managed keys
  • VPC for private data; network isolation to cut the container off entirely
  • Tag and name every job (base_job_name, tags)

MLA‑C02 tasks this module covers

2.1 Choose modeling approachesmain
2.2 Train, fine‑tune, customizemain
2.3.1 Reproducible experimentsone skill

Domain 2, ML Model and FM Development (24%). Also touches 1.3.5 (imbalance) and 4.2.6 (purchasing options).

1

The module on one page

From a business question to a versioned model, in the order you make the decisions.

Frame the problemclassify, predict a number, or find outliers Pick an approachAI service, built‑in, Script Mode, FM Prepare data channels in S3stratified or time split; train, validation Run a training jobcontainer, hyperparameters, instance Handle imbalanceweights, resampling, costs Cut cost, lock downSpot, right‑size, VPC, KMS Validate and trackstratified k‑fold, MLflow runs Register the best modelModel Registry or MLflow, versioned Then: tune and evaluate (next module), deploy, monitor
2

Frame the problem before you pick a tool

The same data can answer different questions. Decide what the business will do with the output, then choose the problem type.

Do you have labels for theoutcome you care about? No Unsupervisedoutliers: RCFgroups: K‑Meanscompress: PCAtopics: LDA, NTM Yes Is the answer a categoryor a number? categorynumber Classificationbinary ormulti‑class; outputsa probability Regressionamount, time,loss in dollars Over time?future values ofa series:forecasting(DeepAR) A classifier’s probability is a score you can rankNeed to spend a fixed review budget on the riskiest cases? Sort bythe predicted probability; you don’t need a separate regression.

Real systems layer more than one model

Incoming transaction Classifierknown fraudpatterns (labels) Anomaly scorenew patterns,no labels needed Loss estimateregression onlikely dollar loss Decision ruleapprove, review or decline
Start with the single simplest model that answers the question. Add layers only when they catch something the first model misses.
3

SageMaker built‑in algorithms

Built‑ins are AWS‑maintained containers: you supply data and hyperparameters, AWS keeps the code patched. Stay on them while your problem fits; move to Script Mode when it doesn’t.

Algorithm picker

What does the data look like?
What do you need?
Choose an answer for each question.

The four you’ll compare most

XGBoostLinear Learnerk‑NNRandom Cut Forest
How it learnsMany small trees, each fixing the last one’s errorsA weighted sum of features, fit with SGDLooks up the closest training rows at prediction timeRandom trees; anomalies get isolated in few cuts
Needs labelsYesYesYesNo
Explain it withFeature importance, SHAPCoefficientsThe neighbours themselvesAnomaly score
Rare classesscale_pos_weightClass weights (positive_example_weight_mult)No built‑in leverNot applicable
Prediction speedFastFastestSlows as data growsFast
Typical roleMain tabular modelBaseline to beatOffline analysis, small setsWatch for new patterns
Two details the exam likesLinear Learner trains several models in parallel with different settings and keeps the best on your validation channel. Factorization Machines learn a small vector per feature so they can estimate interactions between IDs that rarely appear together, which is why they suit click and recommendation data.

XGBoost hyperparameters, and which way to turn them

HyperparameterWhat it controlsTypicalIf overfitting
objectiveTask and lossbinary:logisticn/a
num_roundNumber of trees100–1,000Fewer, or use early_stopping_rounds
max_depthTree depth (capacity)3–10Lower
etaLearning rate per tree0.01–0.3Lower (add rounds)
min_child_weightMinimum weight to make a split1–10Higher
subsample, colsample_bytreeShare of rows and columns per tree0.5–1.0Lower
alpha, lambdaL1 and L2 regularization0–10Higher
scale_pos_weightWeight of the positive classnegatives / positivesn/a
eval_metricWhat validation reportsaucpr for rare classesn/a
4

What a training job actually does

One API call starts a sequence. You pay per second from the moment instances start until they shut down, so every stage costs money.

Billed per second, top to bottom 1. Start instancestype × count you chose 2. Pull containerfrom Amazon ECR 3. Get the dataFile, FastFile or Pipe mode 4. Trainlogs and metrics to CloudWatch 5. Save the model/opt/ml/model → S3 tar.gz 6. Shut downbilling stops
Input modes are covered in Module 1. A failed job writes its reason to /opt/ml/output/failure, which shows up in the job’s failure reason.

The minimum you specify

SettingExampleWhy it matters
Container imageXGBoost 1.7‑1 via image_uris.retrievePin a version; never rely on “latest”
Execution roleRead input prefix, write output prefixEverything the job touches goes through it
Instance type and countml.m5.xlarge × 1Cost and speed
Input channelstrain, validation with content typeValidation enables early stopping and model selection
Output paths3://bucket/models/Where model.tar.gz lands
Name and tagsbase_job_name, project tagsFind the job, and its cost, months later
SDK versionsSageMaker Python SDK v3 trains through ModelTrainer; many examples still use the v2 Estimator. The concepts (image, role, channels, hyperparameters, Spot, checkpoints) are the same, and the exam tests the concepts.
5

Training when the positive class is rare

Standard loss functions treat every mistake the same, so with 0.5% positives the cheapest thing a model can learn is “always negative”. These levers make the rare class count.

Reach for them in this order 1. Class weightsone hyperparameter, no data changes (scale_pos_weight) 2. Resample the training setundersample majority, or SMOTE the minority 3. Per‑row costssample weights when some errors cost more 4. Decision thresholdset after training from business costs Throughout: stratified splits and PR‑AUC, never plain accuracy

scale_pos_weight calculator

Per‑row costs without custom code

The built‑in XGBoost reads a weight per row when you set csv_weights=1: put the weight in the column right after the label. A missed $8,000 fraud can then count far more than a missed $6 one, with no Script Mode needed.

label, weight, f1, f2, ...
1,     42.0,   ...           ← expensive fraud
1,     1.3,    ...           ← small fraud
0,     1.0,    ...
Resampling rules
  • Split first, then resample only the training data. Synthetic rows in validation or test inflate every metric.
  • Inside cross‑validation, resample within each training fold, not before the folds are made.

Why PR‑AUC, not ROC‑AUC

100,000 transactions, 500 frauds, the model catches 400. Slide the number of false alarms.

The false‑positive rate (ROC’s x‑axis) divides by 99,500 negatives, so it barely moves. Precision (PR’s axis) divides by flagged rows, so it shows the damage.

6

Validation you can trust

One train/validation split can be lucky or unlucky, especially with few positives. K‑fold cross‑validation trains k times, holding out a different fold each time, and averages the scores.

Stratified 5‑fold: each fold keeps the same fraud share Report the mean and the spread. A wide spread means theestimate is unstable or the data shifts over time.
Split methodUse when
Stratified split / StratifiedKFoldRows are independent and the positive class is rare
Time‑based split (TimeSeriesSplit)You predict the future: fraud, demand, churn. Train on earlier periods, validate on later ones
Group split (GroupKFold)Several rows per customer or device; keep each group on one side
Keep a final test set out of everythingCross‑validate on training data only. The test set is touched once, at the end, or it stops being an honest estimate.
7

Experiment tracking

Every training run should be traceable: which data, which code, which settings, which result. On SageMaker the current answer is managed MLflow; the older SageMaker Experiments SDK lives on in Studio Classic.

One rune.g. xgb‑weights‑v3 Paramsdepth, eta,weights,strategy MetricsPR‑AUC,recall, F1per fold Artifactsmodel file,plots,reports Lineagedata version,code commit,job name Compare runs, register the winnerModel Registry keeps versions and approval
Log metrics your code computed, not numbers typed by hand. In MLflow that is mlflow.log_param, mlflow.log_metric and mlflow.log_artifact.
8

Script Mode and your own containers

Does a built‑in fit the problem,loss and data format? Yes Built‑inAWS patches it No Can a standard frameworkexpress it in your own script? Yes Script ModeAWS image + code No Bring your own containeryour image in ECR; you patch it Script Mode examples: a custom loss such as focal loss, a new networkarchitecture, or extra pip packages via requirements.txt.

The contract between your script and SageMaker

WhatPath in the containerEnvironment variable
Each input channel/opt/ml/input/data/<name>SM_CHANNEL_<NAME>
Hyperparameterspassed as command‑line argumentsSM_HPS (all as JSON)
Model to keep/opt/ml/modelSM_MODEL_DIR
Checkpoints/opt/ml/checkpointssynced to checkpoint_s3_uri
Other outputs/opt/ml/output/dataSM_OUTPUT_DATA_DIR

Anything left only on the instance disappears when the job ends; only /opt/ml/model becomes the model artifact.

9

Scaling out: data and model parallelism

Data parallelModel parallel data split into shards fullcopy fullcopy fullcopy average gradients same batch for all layers 1–10 · GPU 1 layers 11–20 · GPU 2 layers 21–30 · GPU 3 Whenmodel fits on one GPU,data or time is the limit.The usual first step. Whenparameters, gradients andoptimizer state don’t fitin one GPU: large models
ToolWhat to know
Built‑in XGBoost on several instancesSplit the input into many files and set the channel to ShardedByS3Key, or each instance reads everything. GPU training uses tree_method=gpu_hist; multi‑GPU Dask training needs version 1.5‑1 or later.
SMDDP (SageMaker distributed data parallel)PyTorch only; runs on ml.p4d.24xlarge and ml.p4de.24xlarge (ml.p3dn.24xlarge with no further optimization). TensorFlow support has ended.
SMP (SageMaker model parallel)Shards large models across GPUs.
SageMaker HyperPodPersistent, resilient clusters for long foundation‑model training runs.
Profile before you scaleUnder about an hour on one instance, scaling out mostly adds cost and complexity. Check the job’s CloudWatch CPU, GPU, memory and disk metrics first: a starved GPU usually needs faster data loading, not more GPUs. SageMaker Debugger is closed to new customers; AWS points to CloudWatch, MLflow and TensorBoard instead.
10

Security and cost for training

VPC is not the same as network isolation

VPC configsubnets andsecurity groupsreaches privatedatabases, S3 viaVPC endpointsinternet only ifyou route it Networkisolationcontainer makes nooutbound calls,not even to S3;no AWS credentialsSageMaker stillmoves data in andout for you Bothdata movesthrough yoursubnets; yourcode still can’treach anythingstrongest optionfor untrusted orthird‑party code Also: encrypt_inter_container_traffic for multi‑node jobs,volume_kms_key and output_kms_key for your own KMS keys,and a least‑privilege execution role.

Managed Spot Training

Spot uses spare capacity at up to 90% off. AWS can reclaim it, so the job must be able to resume.

max_wait: waiting for capacity + running wait run ⚡ resume from checkpoint Total run time is capped by max_run, the whole job by max_wait.If max_wait runs out, the job stops; it never switches to on‑demand. interrupted
ParameterPurpose
use_spot_instances=TrueOpt in
max_runLimit on training time
max_waitLimit on waiting plus training; must be at least max_run
checkpoint_s3_uriWhere checkpoints sync. Built‑ins that support checkpointing use it; your own scripts must save to and reload from /opt/ml/checkpoints

Spot savings estimate

Example inputs only. Check current SageMaker training prices and actual Spot savings for your instance and Region.

Match the instance to the algorithm

WorkloadStart withWhy
XGBoost, Linear Learner, scikit‑learnGeneral purpose CPU (ml.m5, ml.m6i)Memory‑bound; GPUs sit idle unless you set GPU training
Big tabular data with GPU XGBoostSingle‑GPU (ml.g5) gpu_hist can be cheaper per run on large data
Small neural networksml.m5 or ml.g4dn / ml.g5GPU helps, not required
Large deep learningml.g5/g6 multi‑GPU, ml.p4d/p5Fast GPU interconnect for distributed training
Cheapest deep‑learning training at scaleml.trn1 (AWS Trainium)Purpose‑built training chips
11

Hands‑on project: decide like an engineer

Three situations you will meet when training for real. Pick an answer, then open the reasoning.

1. The validation curve turns

Training PR‑AUC keeps rising for all 800 rounds. Validation PR‑AUC peaks around round 120 and then slowly falls.

  1. Train for more rounds
  2. Use early stopping on the validation metric, and lower max_depth or eta
  3. Remove the validation channel to save time
Suggested answer
b. The model is memorizing training data after round 120. early_stopping_rounds keeps the best round automatically; lower depth, a smaller learning rate or more regularization reduce the urge to overfit. Without a validation channel you can’t see this at all.

2. A Spot job that never finishes

A custom PyTorch job on Spot is interrupted twice and starts from epoch 1 each time, then hits max_wait and stops.

  1. Switch off Spot permanently
  2. Save checkpoints to /opt/ml/checkpoints each epoch, set checkpoint_s3_uri, and load the latest checkpoint at start
  3. Set max_wait equal to max_run
Suggested answer
b. SageMaker syncs the checkpoint folder to S3, but your script has to write checkpoints and reload them. Option c makes it worse: it leaves no time to wait for capacity.

3. Four instances, no faster

XGBoost on four ml.m5.2xlarge instances takes as long as on one. The training data is a single 20 GB CSV.

  1. Use bigger instances
  2. Split the data into many files and set the channel distribution to ShardedByS3Key
  3. Switch to Pipe mode
Suggested answer
b. With one file and the default FullyReplicated distribution, every instance gets all the data and does the same work. Many files plus ShardedByS3Key give each instance its own share. Also ask whether one instance was already fast enough.

The build, step by step

  1. Split the engineered features by time (train, validation, test), checking each part still contains fraud.
  2. Baseline: Linear Learner with positive‑class weighting. Record PR‑AUC and recall.
  3. Main model: built‑in XGBoost with scale_pos_weight, eval_metric=aucpr and early stopping, on Spot with checkpoints.
  4. Costs: a second XGBoost run with per‑row weights by amount (csv_weights=1). Compare dollars of fraud caught, not just recall.
  5. Track every run in MLflow with parameters, metrics and the model artifact.
  6. Lock down: rerun the winner inside a VPC with network isolation and KMS keys, and confirm the results match.
  7. Register the winner in the Model Registry with its metrics, ready for tuning.
  8. See why the metric matters: train once with eval_metric=error (accuracy) and early stopping, once with aucpr. Compare the round each run stops at and the recall at the same threshold. The accuracy run looks great and catches far less fraud.
12

The rest of the exam guide for this module

Every skill MLA‑C02 lists for Tasks 2.1 and 2.2, where it’s covered, then a short lesson for each one the sections above don’t fully reach.

Skill in the exam guideWhere
2.1.1 Evaluate and select Bedrock foundation modelsDeep dive 3
2.1.2 Fine‑tuning strategies for foundation modelsDeep dive 4
2.1.3 Compare ML models, GenAI models, algorithms, solution templatesSections 2–3, deep dive 8
2.1.4 Custom vs managed vs pre‑trained vs foundation modelsDeep dive 2
2.1.5 RAG architecture patternsDeep dive 5
2.1.6 Performance vs training time vs costSections 9–10
2.1.7 AI performance vs latency vs costDeep dives 2–3
2.1.8 AWS AI services (Textract, Rekognition, Comprehend, Transcribe)Deep dive 1
2.2.1 Built‑in algorithms and common librariesSection 3
2.2.2 Script Mode with supported frameworksSection 8
2.2.3 Hyperparameter optimization (AMT)Deep dive 9, next module
2.2.4 Early stopping, distributed trainingSection 9, deep dive 6
2.2.5 Overfitting, underfitting, catastrophic forgettingDeep dives 4 and 6
2.2.6 Combine models (ensembles)Deep dive 7
2.2.7 Epochs, steps, batch sizeDeep dive 6
2.2.8 Prompt engineering and fine‑tuningDeep dives 2 and 4
2.2.9 Optimize retrieval and embedding modelsDeep dive 5
2.3.1 Reproducible experiments (MLflow, Bedrock evaluations)Section 7

Deep dive 1: use an AI service before building a model

If the task is…Service
Text, forms, tables from scanned documentsAmazon Textract
Objects, faces, labels, unsafe content in images and videoAmazon Rekognition (Custom Labels for your own classes)
Sentiment, entities, key phrases, PII in textAmazon Comprehend (custom classifiers too)
Medical entities in clinical notesAmazon Comprehend Medical
Speech to textAmazon Transcribe
Text to speechAmazon Polly
TranslationAmazon Translate
Chatbots with intents and slotsAmazon Lex
Recommendations from user‑item interactionsAmazon Personalize

Deep dive 2: build, buy or adapt

Climb only as far as you need 1. AI serviceno ML skills or training data; fixed task 2. Foundation model + prompt engineeringBedrock; minutes to try; pay per token 3. RAGmodel answers from your documents 4. Fine‑tunelabeled examples change style or skill 5. Train your own modelmost data, time and control Tabular prediction (fraud, churn) usually skips 2–4: a built‑in wins.
NeedPromptingRAGFine‑tuning
Up‑to‑date or private factsOnly what fits the promptBestPoor; facts go stale
Consistent format, tone or task skillOften enoughDoesn’t helpBest
Data neededNoneDocumentsLabeled pairs
Time and cost to startLowestMediumHighest

Deep dive 3: choosing a Bedrock foundation model

Deep dive 4: fine‑tuning strategies and catastrophic forgetting

StrategyWhat changesUse when
Supervised fine‑tuning (Bedrock or SageMaker)Model weights, from prompt‑response pairsA task or format the base model does poorly
Parameter‑efficient (LoRA and similar)Small adapter weights onlyCheaper training, keeps base knowledge, many adapters per base
Continued pre‑trainingWeights, from unlabeled domain textDomain vocabulary and style; available for selected models
DistillationA smaller student learns from a larger teacherTeacher quality at lower latency and cost
Reinforcement fine‑tuningWeights, from rewards a function assignsQuality is easy to score but hard to label
Catastrophic forgettingFine‑tuning hard on a narrow dataset can erase general skills the model had. Reduce it with a lower learning rate, fewer epochs, parameter‑efficient methods, and some general examples mixed into the training data. Always re‑test general tasks after fine‑tuning.

Deep dive 5: RAG patterns in brief

Deep dive 6: overfitting, underfitting, epochs and batches

loss training time → stop here underfittingboth high overfitting: validationrises, training falls trainingvalidation Early stopping keeps the model from the dashed line automatically.
SymptomFixes
Underfitting: training and validation both poorMore capacity (deeper trees, bigger network), better features, train longer, less regularization
Overfitting: training good, validation poorEarly stopping, regularization (L1/L2, dropout), simpler model, more data or augmentation

Epochs, steps and batch size

One epoch is one pass over the data; one step is one batch. Larger batches mean fewer, smoother steps and usually need a larger learning rate; too large can generalize worse.

Deep dive 7: combining models

MethodHowExample
BaggingTrain many models on random samples, average themRandom forest; lowers variance
BoostingTrain models in sequence, each fixing the last one’s errorsXGBoost, LightGBM; lowers bias
StackingA meta‑model learns from several models’ predictionsLinear model on XGBoost + neural net outputs
CascadesA cheap model handles easy cases, an expensive one the restCuts inference cost

Deep dive 8: managed shortcuts

Deep dive 9: hyperparameter tuning, a preview

SageMaker Automatic Model Tuning (AMT) runs many training jobs and searches the settings for you: grid, random, Bayesian or Hyperband search, with early stopping of poor trials. The next module covers it with evaluation and thresholds.

13

Self‑check questions

Answer each one aloud first, then open it to check.

1. When is a built‑in algorithm the right choice, and when do you move to Script Mode?

Use a built‑in when the problem fits its task, loss and data format: you get an AWS‑maintained, patched container with almost no code. Move to Script Mode when you need a custom loss, a new architecture or a library the built‑ins lack, using an AWS framework container with your own script. Only build your own container when no AWS container can run your code. Each step up adds maintenance you own.

2. What does scale_pos_weight do, and how do you set it?

It multiplies the weight of positive examples in XGBoost’s loss, so missing a positive costs more. A common starting value is the number of negatives divided by positives in the training data: about 199 when positives are 0.5%. Tune it from there, and pair it with a PR‑based metric.

3. Why can ROC‑AUC look great on a rare‑class problem while PR‑AUC looks poor?

ROC plots recall against the false‑positive rate, which divides false alarms by all negatives. With 99.5% negatives, thousands of false alarms barely move that rate. PR plots precision against recall; precision divides by everything flagged, so false alarms show up immediately. PR‑AUC reflects what a fraud team actually experiences.

4. How do you split data for a rare, time‑ordered problem like fraud?

Split by time so training data comes before validation and test data, as in production. Check each split still contains enough positives; within a period, stratify. For cross‑validation use time‑ordered folds, or StratifiedKFold when rows are independent. Keep the test set out of everything until the end.

5. What do you need to set for Managed Spot Training to work safely?

use_spot_instances=True, max_run, a max_wait at least as long as max_run to allow waiting for capacity, and checkpoint_s3_uri. Your own scripts must write checkpoints to /opt/ml/checkpoints and reload them at start. If max_wait runs out, the job stops.

6. Data parallelism or model parallelism: how do you choose?

If the model fits on one GPU and the limit is data size or time, use data parallelism: each device holds a full copy and processes part of the data, then gradients are averaged. If the model itself doesn’t fit in one GPU’s memory, use model parallelism to split it across devices. Profile first; many slow jobs are data‑loading bound.

7. How is network isolation different from running a training job in a VPC?

A VPC config attaches the job to your subnets and security groups so it can reach private resources; the container can still make outbound calls if routing allows. Network isolation blocks all outbound calls from the container, including to S3 and AWS APIs, and gives it no credentials; SageMaker moves the data for it. You can use both together.

8. What should every experiment run record, and where?

Parameters, metrics computed by the code, artifacts (model file, plots), and lineage (data version, code commit, job name). On SageMaker, managed MLflow is the current choice; the best run’s model goes into the Model Registry with its metrics and an approval status.

9. A business needs extraction of fields from invoices. Why not train a model?

Amazon Textract already extracts text, forms and tables from documents with no training data or ML maintenance. Building a custom model costs labeled data, training and upkeep for a solved problem. Climb to custom models only when a managed service or foundation model can’t meet the requirement.

10. What is catastrophic forgetting, and how do you limit it?

After fine‑tuning on a narrow dataset, a model can lose general abilities it had before. Limit it with a lower learning rate, fewer epochs, parameter‑efficient methods such as LoRA, and some general examples in the training mix, then re‑test general tasks.

14

Exam drill

Scenario questions in the exam’s style. Tap an answer to see why.

0 / 0
15

Common traps and outdated advice

Mistakes that show up often in tutorials and sample code, with the fix.