MLS-C01 Question 330
Select 3You are a Machine Learning Engineer tasked with training a deep learning model that requires substantial computational resources. To optimize costs, you decide to use Spot Instances with AWS Batch. Which of the following steps should you take to ensure a cost-efficient and reliable training job?
- A
Configure a Spot Fleet with a diversified set of instance types and availability zones in the AWS Batch Compute Environment.
- B
Set a custom Spot Instance interruption handler to save model checkpoints during instance termination events.
- C
Choose a single instance type with the highest GPU performance for the Compute Environment to maximize training throughput.
- D
Enable retries in the AWS Batch job definition to handle potential interruptions from Spot Instance terminations.
- E
Use On-Demand Instances exclusively to ensure uninterrupted model training.
Show answer and explanation
Correct answers: A, B, D
Explanation
Using Spot Instances with AWS Batch for deep learning model training is a cost-effective solution. To maximize the reliability of such a setup, it's important to configure a diversified Spot Fleet, implement mechanisms to handle interruptions (e.g., saving checkpoints), and enable job retries. These strategies help balance cost efficiency with the reliability required for deep learning workloads.
- A. Correct.
Correct: Diversifying instance types and availability zones increases the chances of successfully acquiring Spot Instances and reduces the risk of interruptions due to insufficient capacity.
- B. Correct.
Correct: Setting up a Spot Instance interruption handler ensures that model checkpoints are saved, allowing for training to resume from the last checkpoint in case of an interruption.
- C. Incorrect.
Incorrect: Using a single instance type limits the flexibility of the Spot Fleet, making it more likely to encounter capacity shortages and increasing the risk of job interruptions.
- D. Correct.
Correct: Enabling retries ensures that the AWS Batch job can recover from Spot Instance terminations by automatically resubmitting the job.
- E. Incorrect.
Incorrect: While On-Demand Instances provide uninterrupted service, they are significantly more expensive and do not align with the goal of cost optimization.