MLS-C01 Question 329
Select 3A data science team is tasked with training a deep learning model using AWS Batch. To optimize costs, the team decides to use Spot Instances. However, they want to ensure the training job can handle Spot Instance interruptions and continue processing without losing progress. Which strategies should the team implement to achieve this?
- A
Use checkpointing in the training script to periodically save model state to Amazon S3.
- B
Configure a job retry strategy in the AWS Batch job definition.
- C
Use Amazon EC2 On-Demand Instances instead of Spot Instances to avoid interruptions.
- D
Set up Spot Instance interruption handlers to gracefully handle interruptions.
- E
Use an instance type with a higher Spot Instance capacity pool to reduce the likelihood of interruptions.
Show answer and explanation
Correct answers: A, B, D
Explanation
Using Spot Instances with AWS Batch for deep learning model training helps reduce costs, but it requires robust strategies to handle potential instance interruptions. Checkpointing ensures that progress is preserved, while AWS Batch's job retry strategy can automatically restart the job if an interruption occurs. Additionally, Spot Instance interruption handlers provide a mechanism to gracefully handle instance termination. These strategies together allow the team to achieve cost efficiency without compromising the training process.
- A. Correct.
Correct. Checkpointing ensures that the model's progress is saved periodically, allowing the training to resume from the last saved state in case of an interruption.
- B. Correct.
Correct. Configuring a retry strategy in AWS Batch ensures that the job restarts automatically if it is interrupted, reducing the need for manual intervention.
- C. Incorrect.
Incorrect. Using On-Demand Instances eliminates interruptions but significantly increases costs, which contradicts the goal of optimizing cost with Spot Instances.
- D. Correct.
Correct. Spot Instance interruption handlers allow you to gracefully handle interruptions, enabling you to save state or take necessary actions before the instance is terminated.
- E. Incorrect.
Incorrect. While selecting an instance type with a higher Spot capacity pool can reduce the likelihood of interruptions, it does not guarantee interruption handling or progress preservation.