Courseiva
ML Model Development →mediumMultiple Choice

MLA-C01 ML Model Development Practice Question

A team wants to use a custom PyTorch training script in SageMaker. They need to install additional Python packages not included in the base PyTorch container. Which approach should they take?

⚠ Common exam trap

MLA-C01 often tests the boundary between Script Mode with requirements.txt (simple Python deps) and custom containers (OS-level or framework changes) — candidates over-engineer by choosing custom Docker builds when requirements.txt suffices.

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

✓

Use the SageMaker PyTorch estimator with a requirements.txt file

The SageMaker PyTorch estimator supports a 'requirements.txt' file in the source directory (specified via 'source_dir'), which SageMaker automatically installs into the training container before the script runs. This is the simplest, AWS-recommended way to add Python packages without building a custom image. It preserves the managed PyTorch container's optimizations while adding only the extra dependencies.

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 with a custom Dockerfile

    Why it's wrong here

    Script Mode with a custom Dockerfile still builds and pushes an image, so it does not satisfy the requirement to install packages without maintaining a container. It is tempting because Script Mode handles custom training scripts, and would be correct when only entry-point code, not dependencies, differs from the base image.

  • ✗

    Build a custom container with Docker

    Why it's wrong here

    Building a custom container requires writing a Dockerfile, building, and pushing the image to ECR, which the scenario does not call for. It is tempting because custom containers give full control over dependencies, and would be correct when you need OS-level libraries or a non-SageMaker framework.

  • ✗

    Install packages using a lifecycle configuration

    Why it's wrong here

    Lifecycle configurations run shell scripts on notebook or inference instances, not inside training containers, so packages never reach the PyTorch training job. It is tempting because lifecycle scripts do install Python packages, and would be correct for preparing a SageMaker notebook instance's environment before interactive work.

  • ✓

    Use the SageMaker PyTorch estimator with a requirements.txt file

    Why this is correct

    The PyTorch estimator accepts a requirements.txt file, which SageMaker installs into the container before training begins. This adds the extra Python packages without building a custom image, satisfying the need for dependencies absent from the base container.

About these practice questions

This MLA-C01 question is part of Courseiva's 665-question bank — original exam-style content with full explanations and wrong-answer analysis, never real exam questions or exam dumps. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

JA

Written and reviewed by Johnson Ajibi, MSc IT Security

Senior Network & Security Engineer · founder of Courseiva

Last reviewed September 2026 · checked against the official Amazon Web Services exam blueprint

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.