MLA-C01 ML Model Development Practice Question
A company is using SageMaker to train a model with a custom container. The training script requires a specific version of a Python library that is not included in the default SageMaker containers. How should they provide this library?
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
✓
Extend a SageMaker framework container and install the library using a Dockerfile
Using a custom container (BYOC) allows bundling all dependencies, including specific library versions, into a Docker image that SageMaker can run.
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 SageMaker Script Mode and specify the library in a requirements.txt
Why it's wrong here
Although SageMaker Script Mode can install additional Python packages via a requirements.txt file, this approach installs the packages at runtime, which increases training startup time and may not be reliable for all dependencies. Extending the container is the recommended approach for custom dependencies.
- ✗
Use SageMaker's lifecycle configuration to install the library on the training instance
Why it's wrong here
Lifecycle configurations run scripts on notebook instances, not training containers; training jobs ignore them. It is tempting because it customises environments, and would be correct for installing packages on a notebook instance, not for injecting a library into a custom training container.
- ✗
Use pip install in the training script before model training
Why it's wrong here
While pip install can be run within the training script, it is not the recommended approach for custom containers because it adds runtime overhead and may cause dependency conflicts. The proper method is to include the library in the Docker image.
- ✓
Extend a SageMaker framework container and install the library using a Dockerfile
Why this is correct
Extending a SageMaker framework container with a Dockerfile allows bundling all required dependencies, including specific versions of Python libraries, into the Docker image that SageMaker will use for training. This ensures consistency and avoids runtime installation issues.
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.