hardMultiple Choice
MLA-C01 Practice Question: During deployment of a Hugging Face model, the…
Exhibit
Refer to the exhibit. ``` CloudWatch Logs from a SageMaker endpoint: [ERROR] Runtime.ImportModuleError: Unable to import module 'inference': No module named 'transformers' ```
During deployment of a Hugging Face model, the endpoint logs show this error. Which step was likely missed?
⚠ Common exam trap
A common mix-up: candidates confuse runtime dependency issues (missing Python libraries) with infrastructure or configuration problems (IAM permissions, instance types, or packaging), leading them to select a plausible-sounding but incorrect option like B or C.
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 inference container does not include the transformers library; the team should use a pre-built Hugging Face container.
The error indicates that the inference container cannot find the `transformers` library, which is required to load and run the Hugging Face model. By using a pre-built Hugging Face container from AWS, the team ensures that all necessary dependencies (like `transformers`, `tokenizers`, and `torch`) are pre-installed and compatible with the SageMaker inference environment. Option A is correct because the most likely missed step was selecting a generic container instead of the purpose-built Hugging Face container.
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 inference container does not include the transformers library; the team should use a pre-built Hugging Face container.
Why this is correct
The endpoint's inference container lacks the transformers library that Hugging Face models import at load time, so the model fails to initialise. Switching to a pre-built Hugging Face inference container supplies the required dependencies, satisfying the deployment requirement that the runtime environment match the model's framework.
- ✗
The IAM role does not have permissions to download additional libraries.
Why it's wrong here
Endpoint execution roles grant access to AWS services such as S3 and ECR, not to Python packages; missing libraries come from an absent requirements.txt or an incorrect inference source directory. It is tempting because IAM permission errors are common during SageMaker deployment and do block model artefact retrieval.
- ✗
The model artifact was not packaged correctly; the inference script is missing.
Why it's wrong here
Packaging faults surface as import or dependency errors before the endpoint ever binds a port, so they cannot produce this runtime log. The inference script matters when a custom handler is supplied, but the stem's error points elsewhere; packaging is validated during model registration and deployment creation.
- ✗
The endpoint configuration specifies the wrong instance type.
Why it's wrong here
An instance-type mismatch fails capacity or memory checks at endpoint creation, not with this log signature. Instance selection governs compute sizing for the model's memory and accelerator needs, so it would be the answer only if the error named insufficient resources or an unsupported instance family.
Go deeper
Related to this question
About these practice questions
One of 665 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.