The correct answer is that the team likely missed selecting a pre-built Hugging Face container, which is why the inference endpoint logs show the transformers library is missing. When deploying Hugging Face models on SageMaker with pre-built containers, these purpose-built images come with transformers, tokenizers, and PyTorch pre-installed and optimized for the SageMaker inference environment. Using a generic container instead means none of these critical dependencies are present, causing the model to fail at load time. On the AWS Certified Machine Learning Engineer Associate MLA-C01 exam, this scenario tests your understanding of SageMaker’s managed container ecosystem and the common trap of assuming any Python container will work for Hugging Face models. The exam expects you to recognize that the Hugging Face Deep Learning Container (DLC) is the correct choice because it eliminates dependency mismatches. Memory tip: think “Hugging Face needs Hugging Face containers” — if you see a missing transformers error, the fix is always the pre-built Hugging Face image.
MLA-C01 Deployment and Orchestration of ML Workflows Practice Question
This MLA-C01 practice question tests your understanding of deployment and orchestration of ml workflows. The scenario asks you to isolate a root cause — eliminate options that address a different problem before choosing. After answering, compare your reasoning against the explanation and wrong-answer breakdown below. Once you have made your selection, read the full explanation to reinforce the concept and understand why each distractor is designed to mislead on exam day.
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?
Refer to the exhibit.
```
CloudWatch Logs from a SageMaker endpoint:
[ERROR] Runtime.ImportModuleError: Unable to import module 'inference': No module named 'transformers'
```
A
The inference container does not include the transformers library; the team should use a pre-built Hugging Face container.
Hugging Face containers are pre-built with transformers and other dependencies.
B
The IAM role does not have permissions to download additional libraries.
Why wrong: Permission issues are not reflected in import module errors.
C
The model artifact was not packaged correctly; the inference script is missing.
Why wrong: Missing script would cause a different import error, not specifically transformers.
D
The endpoint configuration specifies the wrong instance type.
Why wrong: Instance type affects performance, not module imports.
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.
Key principle: Answer the scenario, not the keyword: identify the specific constraint before choosing the most familiar-sounding option.
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.
Related concept
Read the scenario before looking for a memorised answer.
✗
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.
Common exam traps
Common exam trap: answer the scenario, not the keyword
The trap here is that 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.
Detailed technical explanation
How to think about this question
Under the hood, SageMaker uses Docker containers to serve models; the Hugging Face Deep Learning Container (DLC) includes pre-installed libraries like `transformers`, `datasets`, and `tokenizers` pinned to specific versions for compatibility. If a custom container is built without these libraries, the inference code fails at import time because Python's import system cannot resolve the module from the container's filesystem. In real-world scenarios, teams often mistakenly use a generic PyTorch or TensorFlow container and forget to install `transformers`, leading to this exact error.
KKey Concepts to Remember
Read the scenario before looking for a memorised answer.
Find the constraint that changes the correct option.
Eliminate answers that are true in general but not in this case.
TExam Day Tips
→Watch for words such as best, first, most likely and least administrative effort.
→Review why wrong options are wrong, not only why the correct option is correct.
Key takeaway
Answer the scenario, not the keyword: identify the specific constraint before choosing the most familiar-sounding option.
Real-world example
How this comes up in practice
A company's IT admin needs to give a contractor read-only access to production logs without sharing account credentials. Using role-based access control (RBAC) and temporary scoped permissions — not a permanent shared password — is the correct pattern. Questions like this test whether you can apply least-privilege access across cloud identity services.
What to study next
Got this wrong? Here's your next step.
Identify which exam domain this question belongs to, review the core concept, then practise similar questions from the same domain.
Deployment and Orchestration of ML Workflows — This question tests Deployment and Orchestration of ML Workflows — Read the scenario before looking for a memorised answer..
What is the correct answer to this question?
The correct answer is: 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.
What should I do if I get this MLA-C01 question wrong?
Identify which exam domain this question belongs to, review the core concept, then practise similar questions from the same domain.
What is the key concept behind this question?
Read the scenario before looking for a memorised answer.
About these practice questions
Courseiva creates original exam-style practice questions with explanations and wrong-answer analysis. It does not publish real exam questions, exam dumps, or protected exam content. Learn why practice questions differ from exam dumps →
Share a tip, memory trick, or ask about the reasoning behind this question. Do not post real exam questions, leaked content, braindumps, or copyrighted exam material. Comments are moderated and may be removed without notice.
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.
Question Discussion
Share a tip, memory trick, or ask about the reasoning behind this question. Do not post real exam questions, leaked content, braindumps, or copyrighted exam material. Comments are moderated and may be removed without notice.
Sign in to join the discussion.