Based on the MLA-C01 exam guideReport an error
model.tar.gz to S3, and then shuts down automatically. The blueprint is the Estimator, and your own script is the entry_point.This week covered the whole training stage, where "data is turned into a model." We tie the four lessons into a single flow so you can skim them quickly right before the exam.
[Data (S3/FSx)]
│ Input channel (File / Pipe / Fast File)
▼
[Training Job] ← Estimator (container, role, instance, hyperparameters)
│ ├─ Built-in algorithms (XGBoost, Linear Learner, ...)
│ ├─ Framework Estimator (entry_point=my script)
│ └─ JumpStart (fine-tune a pretrained model)
│ Instance: CPU (traditional ML) / GPU (deep learning) / distributed (instance_count↑)
│ Cost saving: Managed Spot + checkpoints
▼
[Model artifact (model.tar.gz, S3)]
▲
[AMT tuning] ── automatically runs many Training Jobs (Bayesian / early stopping / warm start)
This one diagram holds the whole week. Data enters through the input channel and is trained in a Training Job (defined by an Estimator), the model is stored in S3, and on top of that AMT launches many training runs to find the best hyperparameters.
Day 1 — Training Job
entry_point.fit(). The input modes are File (download everything), Pipe (streaming), and Fast File.instance_count↑).max_wait >= max_run.Day 2 — Built-in Algorithms
Day 3 — AMT (Hyperparameter Tuning)
early_stopping_type='Auto') stops hopeless training jobs and saves cost.Day 4 — JumpStart, Transfer Learning, Cost
deploy as is, or fit → deploy (fine-tuning).max_run and automatic notebook idle shutdown prevent charges for forgotten resources.Exam passages usually state first "what you want to save" or "what is lacking." Once you catch that clue, the choices sort themselves out quickly.
What is the most emphasized constraint in the passage?
├─ Cost
│ ├─ Interruption is fine as long as it can resume → Spot + checkpoints
│ ├─ Tuning cost is large → early stopping
│ └─ Want to reduce the training amount itself → transfer learning / JumpStart
├─ Time / speed
│ ├─ Long wait before training starts → Pipe / Fast File mode
│ ├─ I/O bottleneck every epoch → FSx for Lustre
│ └─ One machine is too slow → distributed training (instance_count↑)
├─ Data
│ ├─ Few labels → transfer learning (fine-tuning)
│ ├─ High-dimensional sparse → Linear Learner
│ └─ Large streaming → RecordIO-protobuf
└─ Performance / accuracy
├─ Hyperparameters don't fit → AMT (Bayesian)
├─ One training run takes hours → Hyperband
└─ Continue from a previous tuning → warm start💡 Related theory: The big picture running through this week is "compute only as much as needed, as efficiently as possible." Training uses expensive GPU time, so you ① compute less to begin with (transfer learning), ② search smartly (Bayesian + early stopping), ③ use cheap resources (Spot), and ④ shut down automatically when finished (automatic shutdown). The training stage is exactly where ML knowledge from model development and cost-efficiency thinking from the cloud come together.
We organize the choices that are easy to confuse on the exam as boundaries.
| Situation | Correct answer | Confusing wrong answer |
|---|---|---|
| I/O bottleneck reading large data repeatedly | FSx for Lustre | S3 File mode |
| Large streaming input format | RecordIO-protobuf | CSV |
| Cost saving + resume after interruption | Spot + checkpoints | Spot only |
| Efficient hyperparameter search | Bayesian | Grid (exhaustive) |
| Early stopping for long deep learning tuning | Hyperband | Random |
| Reuse earlier tuning results | Warm start | New tuning |
| Classifier with little labeled data | Transfer learning | Training from scratch |
| Quickly deploy a verified model | JumpStart | Custom container |
| Train my PyTorch script | Framework Estimator | Built-in container |
| Structured tabular classification | XGBoost | BlazingText |
| Tens of thousands of features, sparse classification | Linear Learner | XGBoost |
| User × item sparse recommendation | Factorization Machines | K-Means |
| Need object locations within an image | Object Detection | Image Classification |
| Long wait before training starts | Pipe / Fast File mode | Instance upgrade |
| Charges for an idle notebook | Idle auto-shutdown lifecycle config | Spot notebook |
| Runaway training that never ends | Set a max_run cap | Manual monitoring |
Focus on which clues (data volume/shape, whether interruption is allowed, budget, training time) in the passage point to the keywords on the "correct answer" side of this table, and most questions will be solved.
The concepts of the four lessons connect in real code as a single flow. Pointing out which day each line of this snippet comes from makes for a good review.
from sagemaker.pytorch import PyTorch
from sagemaker.tuner import HyperparameterTuner, ContinuousParameter, IntegerParameter
from sagemaker.inputs import TrainingInput
estimator = PyTorch( # Day 1: framework Estimator
entry_point='train.py', # Day 1: my training script
role=role,
instance_type='ml.g5.xlarge', # Day 1: deep learning, so GPU
instance_count=1,
use_spot_instances=True, # Day 1, 4: lower the unit price
max_run=3600,
max_wait=7200, # Day 1: max_wait >= max_run
checkpoint_s3_uri='s3://my-bucket/ckpt/', # Day 1: prepare for interruption
)
tuner = HyperparameterTuner( # Day 3: AMT
estimator=estimator,
objective_metric_name='validation:auc',
objective_type='Maximize',
hyperparameter_ranges={
'lr': ContinuousParameter(1e-4, 1e-2),
'batch_size': IntegerParameter(16, 128),
},
max_jobs=20,
max_parallel_jobs=3, # Day 3: too high reduces the Bayesian advantage
strategy='Bayesian',
early_stopping_type='Auto', # Day 3, 4: reduce the amount of work
)
tuner.fit({ # Day 1, 2: input channels and format
'train': TrainingInput('s3://my-bucket/train/', input_mode='Pipe'),
'validation': TrainingInput('s3://my-bucket/valid/', input_mode='Pipe'),
})⚠️ Pitfall: The easy traps are picking Spot just because you see "cost saving" while forgetting checkpoints, and thinking of Grid unconditionally whenever you see "tuning." Spot is paired with checkpoints because it can be interrupted, and the basis of efficient tuning is Bayesian, not the exhaustive Grid. Another frequent mistake is choosing a built-in container for "training my own script" — custom code is the framework Estimator's
entry_point.
We gathered the diagnostic tables from the four lessons in one place. Exam passages are usually a variation of one of the symptoms below.
| Symptom | Cause | Action | Related |
|---|---|---|---|
| Long wait before training starts | File mode downloads all the large data | Pipe / Fast File mode | Day 1 |
| I/O is the bottleneck every epoch | Repeated retransfer from S3 | FSx for Lustre | Day 1 |
| Spot restarts from scratch every time | No checkpoint configured, no resume logic | checkpoint_s3_uri + script resume handling | Day 1 |
| Switching to GPU doesn't make it faster | The bottleneck is I/O, not computation | Improve data loading first with input mode/FSx | Day 1 |
| XGBoost predictions are meaningless | CSV header left in, or label in the last column | Remove the header, put the label in the first column | Day 2 |
| Training is a struggle on high-dimensional sparse data | Tree splits are poorly suited to sparse features | Switch to Linear Learner | Day 2 |
| Performance doesn't improve however much tuning is run | The search range misses the optimum | Widen the range + search on a log scale | Day 3 |
| Bayesian is no different from Random | max_parallel_jobs is excessive | Lower the parallelism to regain the sequential advantage | Day 3 |
| Performance drops when deployed after tuning | Overfitting to the validation set | Do a final check on a test set not used for tuning | Day 3 |
| Accuracy is poor because there are few labels | Overfitting from too little data | Fine-tune a pretrained model (transfer learning) | Day 4 |
| It got worse after fine-tuning | Shaking all layers with little data | Freeze lower layers + lower the learning rate | Day 4 |
| Charges appear though nobody is using it | Notebook instance left running | Idle auto-shutdown lifecycle config | Day 4 |
If this week was the stage of "building" the model, next week (Model Development 2) continues into the stage of evaluating and analyzing the model you built. It covers learning curves and overfitting/underfitting diagnosis, evaluation metrics (accuracy, precision, recall, F1, AUC), and the tools that let you look into and compare the training process with SageMaker Debugger and Experiments. Today's "how do we train a model" becomes the foundation for next week's "was that model trained well?"
Click a choice to reveal the answer and explanation.
Question 1
Which of the following is correct about SageMaker Training Jobs and built-in algorithms?
Question 2
Across several scenarios aimed at reducing training cost, which pairing is most appropriate?
Question 3
In distributed training that repeatedly reads several TB of data over many epochs, I/O is the bottleneck, and you want to feed the input data efficiently as large-volume streaming. What is the most appropriate combination?
Question 4
Which is correct about AMT (hyperparameter tuning)?
Question 5
You want to fine-tune a validated pretrained text model on your domain data and deploy it quickly and cheaply. What is the most suitable approach?