AIF-C01 Fundamentals of AI and ML Practice Question
Exhibit
{
"TrainingJobName": "my-training-job-1",
"TrainingJobStatus": "Failed",
"FailureReason": "AlgorithmError: OutOfMemoryError: CUDA out of memory. Tried to allocate 4.00 GiB (GPU 0; 8.00 GiB total capacity; 3.95 GiB already allocated; 2.50 GiB free; 4.00 GiB reserved in total by PyTorch)"
}Refer to the exhibit. A data scientist ran a training job on Amazon SageMaker. The job failed with the error shown. What is the most likely cause?
⚠ Common exam trap
AWS often tests the distinction between infrastructure errors (S3, IAM) and runtime errors (CUDA memory), where candidates mistakenly attribute a GPU memory error to a misconfiguration in data access or code syntax.
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
✓
The batch size is too large for the instance's GPU memory
The error message indicates a CUDA out-of-memory error, which occurs when the GPU memory is insufficient for the requested batch size. Option D is correct because increasing the batch size beyond the GPU's memory capacity causes the training job to fail with this specific error.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
The S3 input path is incorrect
Why it's wrong here
An incorrect S3 path would result in a 'NoSuchKey' or 'AccessDenied' error.
- ✗
The IAM role does not have permission to access S3
Why it's wrong here
Permission errors would appear as 'AccessDenied' before training starts.
- ✗
The training code has a syntax error
Why it's wrong here
Syntax errors would produce a different error message (e.g., NameError, SyntaxError).
- ✓
The batch size is too large for the instance's GPU memory
Why this is correct
The error shows CUDA out of memory, typically due to batch size or model size exceeding GPU memory.
Go deeper
Related to this question
About these practice questions
One of 619 original AIF-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 AIF-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 AIF-C01 exam.