MLS-C01 Question 332
Select 3You are a Machine Learning Engineer tasked with training a deep learning model on a large dataset. To optimize costs, you decide to use Spot Instances via AWS Batch for training. Which of the following steps should you take to ensure the training job is cost-efficient while minimizing the risk of interruptions?
- A
Create an AWS Batch Compute Environment with Spot Instances and set a maximum bid price close to the On-Demand price for higher availability.
- B
Configure a job retry strategy in AWS Batch to automatically resubmit jobs if they are interrupted.
- C
Use checkpointing in your training script to save model progress periodically to Amazon S3.
- D
Select only a specific Availability Zone for Spot Instances to ensure consistent resources.
- E
Combine Spot and On-Demand Instances in a Mixed Compute Environment to balance cost and availability.
Show answer and explanation
Correct answers: B, C, E
Explanation
When using Spot Instances for training deep learning models in AWS Batch, interruptions are a key consideration. To minimize their impact, it is important to implement strategies such as job retry policies and checkpointing to save progress. Additionally, blending Spot and On-Demand Instances in a Mixed Compute Environment can help balance cost savings with availability. Avoid bidding strategies that approach On-Demand pricing as they reduce cost efficiency, and avoid restricting availability zones to prevent resource limitations.
- A. Incorrect.
Setting a maximum bid price close to the On-Demand price increases availability but reduces cost efficiency as the price approaches On-Demand rates. This is not the optimal approach for cost savings.
- B. Correct.
Configuring a job retry strategy ensures that interrupted jobs are automatically resubmitted, which is crucial when using Spot Instances that can be interrupted.
- C. Correct.
Using checkpointing allows you to save training progress and resume from the last checkpoint if the Spot Instance is interrupted, minimizing loss of work.
- D. Incorrect.
Restricting Spot Instances to a specific Availability Zone can limit resource availability and increase the likelihood of interruptions, which is not ideal for Spot training jobs.
- E. Correct.
Combining Spot and On-Demand Instances in a Mixed Compute Environment provides a balance between cost efficiency and resource availability, making it a recommended approach for critical workloads.