MLA-C01 Question 393
Single answerYou are working as a Machine Learning Engineer at a retail company that uses AWS services for its machine learning workflows. The team is using Amazon SageMaker to train a model that predicts customer churn. During training, you notice that the training job is taking significantly longer than expected, and the CPU utilization is consistently high, while GPU usage remains minimal. What should you do to optimize the training process?
- A
Switch the instance type to a GPU-enabled instance, such as a p3 instance, to accelerate training.
- B
Increase the instance size to a larger CPU instance, such as an m5.8xlarge, to handle the workload.
- C
Enable Amazon SageMaker Debugger to identify bottlenecks in the training workflow.
- D
Verify that the training script is optimized to leverage GPU resources, such as using GPU-compatible libraries like TensorFlow or PyTorch.
Show answer and explanation
Correct answer: D
Explanation
When training a machine learning model on Amazon SageMaker, it's important to ensure the training script is optimized to utilize the hardware resources available. High CPU utilization and low GPU utilization typically indicate that the training script is not configured to take advantage of GPU resources. By verifying and optimizing the script for GPU usage, you can significantly reduce training time and maximize resource efficiency.
- A. Incorrect.
Switching to a GPU-enabled instance can accelerate training, but only if the training script is properly configured to utilize the GPU. Without verifying the training script, switching instances may not resolve the issue.
- B. Incorrect.
Increasing the CPU instance size may temporarily improve performance but does not address the root cause of the problem: the lack of GPU utilization.
- C. Incorrect.
While enabling Amazon SageMaker Debugger can help monitor and debug training jobs, it does not directly address the issue of underutilized GPU resources.
- D. Correct.
Verifying that the training script is optimized for GPU usage is the correct approach. If the script is not GPU-compatible, GPU resources will remain underutilized, regardless of the instance type.