Courseiva
ML Model Development →mediumMultiple Choice

MLA-C01 ML Model Development Practice Question

A machine learning engineer is using SageMaker to train a model and wants to automatically stop a training job when the validation loss has not improved for 10 consecutive epochs, while still saving the best model artifacts. The engineer is using the SageMaker training toolkit in a custom container. Which combination of actions should the engineer take?

⚠ Common exam trap

The trap here is expecting SageMaker to provide a built-in early stopping feature for custom training scripts, when it must be coded explicitly.

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

✓

Implement early stopping in the training script by tracking validation loss and calling the SageMaker training toolkit's save_model or exiting the loop when the patience threshold is reached.

Early stopping based on validation loss patience is logic that belongs in the training script when using a custom container. The script should evaluate validation loss each epoch, track the best value, and stop after 10 epochs without improvement, saving the best model artifacts. Estimator time limits, tuning strategies, and Debugger rules do not implement this per-epoch behavior.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • ✗

    Configure the estimator's stopping condition with the MaxRuntimeInSeconds parameter and set the checkpoint_s3_uri to save intermediate models.

    Why it's wrong here

    MaxRuntimeInSeconds stops a job after a fixed wall-clock time, not after a number of epochs without improvement. Checkpointing saves intermediate states, but it does not implement early stopping logic. This combination would terminate training based on time rather than on validation performance, which does not meet the requirement.

  • ✗

    Use SageMaker Automatic Model Tuning with the Bayesian strategy and set the max_parallel_jobs parameter to 1 to enable early stopping across trials.

    Why it's wrong here

    Automatic Model Tuning searches hyperparameter configurations; it does not stop a single training job based on validation loss patience. Setting max_parallel_jobs to 1 limits concurrent trials but does not implement per-epoch early stopping. This approach would launch multiple jobs and increase cost without addressing the stated requirement.

  • ✓

    Implement early stopping in the training script by tracking validation loss and calling the SageMaker training toolkit's save_model or exiting the loop when the patience threshold is reached.

    Why this is correct

    SageMaker does not provide a built-in early stopping callback for custom training scripts. The engineer must implement patience logic in the script, monitoring validation loss and breaking the training loop when there is no improvement for 10 epochs. Saving the best model before exiting ensures the artifacts reflect the best checkpoint rather than the final epoch.

  • ✗

    Enable SageMaker Debugger with the vanishing_gradient rule and configure a stop condition on the rule to halt training when validation loss plateaus.

    Why it's wrong here

    SageMaker Debugger rules such as vanishing_gradient analyze tensors and can trigger stop conditions, but they detect gradient issues, not validation loss plateaus. There is no built-in rule that stops on validation loss patience. Using Debugger here would require a custom rule and would not directly monitor the validation metric the engineer cares about.

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.