MLA-C01 ML Model Development Practice Question
A machine learning engineer is preparing a training script that must run on multiple GPU instances with SageMaker. The script currently reads the entire training dataset from local disk into memory, which fails on larger datasets. The engineer wants the script to stream training data from the SageMaker training channel path without loading everything into memory. Which approach should the engineer take?
⚠ Common exam trap
The trap here is assuming SM_CHANNEL_TRAIN holds an S3 URI and that Boto3 streaming is the intended pattern, when it actually points to a local container path.
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
✓
Use a framework-provided dataset or iterator that reads from the path in SM_CHANNEL_TRAIN and yields batches lazily during training.
SageMaker downloads the contents of each training channel to a local path and exposes that path through the SM_CHANNEL_TRAIN environment variable. Using a framework-native dataset or iterator that reads lazily from that path streams batches on demand, so memory stays bounded regardless of dataset size. Direct S3 reads, EFS mounts, and volume resizing do not address in-memory loading.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✓
Use a framework-provided dataset or iterator that reads from the path in SM_CHANNEL_TRAIN and yields batches lazily during training.
Why this is correct
SageMaker copies channel data to a local directory and exposes the path through the SM_CHANNEL_TRAIN environment variable. Framework integrations such as PyTorch Dataset/DataLoader, TensorFlow tf.data, or the SageMaker training toolkit input modules can read from that path lazily, so only the batches needed for each step are materialized. This avoids loading the full dataset into memory.
- ✗
Set the estimator's volume_size parameter large enough to hold the dataset and enable cacheutils to copy the data into the container's memory before training starts.
Why it's wrong here
Increasing volume_size only provides more disk space; it does not reduce memory use. SageMaker cacheutils can cache data on disk for reuse across jobs, but it does not stream data into memory batch by batch. Copying the full dataset into memory is exactly the failure mode the engineer is trying to avoid.
- ✗
Read the dataset directly from the Amazon S3 URI passed in the SM_CHANNEL_TRAIN environment variable using the AWS SDK for Python (Boto3) inside the training loop.
Why it's wrong here
The SM_CHANNEL_TRAIN variable contains a local filesystem path in the container, not an S3 URI. Reading from S3 with Boto3 inside the training loop adds network latency per batch and requires S3 permissions, but SageMaker already downloads the channel data to local storage. This approach is slower and unnecessary for streaming from the channel.
- ✗
Configure the estimator with an Amazon EFS file system and mount the dataset into the container, then use memory-mapped file access for all training samples.
Why it's wrong here
Amazon EFS can be mounted, but it is not required to stream channel data and adds setup complexity. Memory-mapping still touches the full file index and can exhaust memory when samples are large. The built-in channel mechanism already provides local access to the data, so this option solves a problem that does not exist in the scenario.
Quick reference
AWS S3 Storage Class Comparison
| Storage Class | Min Duration | Retrieval | Use Case |
|---|---|---|---|
| S3 Standard | None | Immediate | Frequently accessed data |
| S3 Standard-IA | 30 days | Immediate | Infrequent access, rapid retrieval |
| S3 One Zone-IA | 30 days | Immediate | Non-critical infrequent data |
| S3 Intelligent-Tiering | None | Immediate–hours | Unknown or changing access patterns |
| S3 Glacier Instant | 90 days | Milliseconds | Archive with instant retrieval |
| S3 Glacier Flexible | 90 days | Minutes–hours | Archive, flexible retrieval |
| S3 Glacier Deep Archive | 180 days | Hours | Long-term compliance archive |
Go deeper
Related to this question
About these practice questions
This MLA-C01 question is part of Courseiva's 665-question bank — original exam-style content with full explanations and wrong-answer analysis, never real exam questions or exam dumps. Learn why practice questions differ from exam dumps →
JA
Written and reviewed by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
Last reviewed September 2026 · checked against the official Amazon Web Services exam blueprint
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.