hardMultiple ChoiceObjective-mapped
MLA-C01 Practice Question: A data scientist is running a SageMaker training…
A data scientist is running a SageMaker training job with a custom PyTorch image. The training script loads a large dataset into memory, and the job fails with an out-of-memory error after a few minutes. The instance type is ml.m5.xlarge (16 GB RAM). What should the data scientist do to resolve this issue without changing the instance type?
⚠ Common exam trap
Test-takers frequently confuse streaming data (Pipe mode) with reducing in-memory data loading, not realizing that the script's explicit load into memory bypasses any streaming benefit.
Answer choices
Why each option matters
Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.
Correct answer & explanation
✓
Reduce the batch size in the training script
Reducing the batch size decreases the amount of data loaded into memory at once, directly addressing the out-of-memory error without changing the instance type. Since the training script loads a large dataset into memory and fails after a few minutes, a smaller batch size reduces peak memory consumption per iteration, allowing the job to fit within the 16 GB RAM of ml.m5.xlarge.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
Enable SageMaker Managed Spot Training to free memory
Why it's wrong here
Spot training does not affect memory allocation; it only reduces cost.
- ✗
Implement data loading with multiprocessing and increase the number of workers
Why it's wrong here
Multiprocessing may increase overall memory usage, potentially worsening the OOM issue.
- ✓
Reduce the batch size in the training script
Why this is correct
Smaller batch sizes reduce memory consumption per step, helping to fit within the available RAM.
- ✗
Use SageMaker Pipe mode to stream data from S3
Why it's wrong here
Pipe mode streams data directly from S3, which can reduce memory footprint, but the error may persist if the script still loads the full dataset.
Visual reference
Go deeper
Related to this question
About these practice questions
One of 835 original MLA-C01 practice questions on Courseiva, each with a full explanation and wrong-answer analysis — not exam dumps or protected exam content. Learn why practice questions differ from exam dumps →
JA
Written by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
This MLA-C01 practice question is part of Courseiva's free Amazon Web Services certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the MLA-C01 exam.