hardMultiple ChoiceObjective-mapped
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
Hugging Face containers are pre-built with transformers and other dependencies.
- ✗
The IAM role does not have permissions to download additional libraries.
Why it's wrong here
Permission issues are not reflected in import module errors.
- ✗
The model artifact was not packaged correctly; the inference script is missing.
Why it's wrong here
Missing script would cause a different import error, not specifically transformers.
- ✗
The endpoint configuration specifies the wrong instance type.
Why it's wrong here
Instance type affects performance, not module imports.
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.