MLA-C01 Question 275
Single answerYou are tasked with deploying a machine learning model for real-time inference using Amazon SageMaker. The model has specific dependencies that are not included in the pre-built Amazon SageMaker containers. Additionally, you need to optimize the container for faster inference times. How should you choose the appropriate container for this use case?
- A
Use a pre-built SageMaker container and modify its configuration during deployment.
- B
Build a custom container with the required dependencies and performance optimizations.
- C
Use a pre-built SageMaker container and install the required dependencies at runtime.
- D
Build a custom container only if the pre-built containers fail to load your model.
Show answer and explanation
Correct answer: B
Explanation
When deploying a machine learning model with specific dependencies and performance requirements, using a custom container is the best option. A custom container ensures all dependencies are installed and allows for environment optimizations that are crucial for achieving faster inference times. Pre-built SageMaker containers are suitable for general use cases but lack flexibility for advanced scenarios like this one.
- A. Incorrect.
This option is incorrect because pre-built SageMaker containers are not designed to be modified extensively during deployment. They are suitable for standard use cases where additional dependencies are not required.
- B. Correct.
This is the correct answer because building a custom container allows you to include all necessary dependencies and optimize the environment for your specific model requirements, including performance improvements.
- C. Incorrect.
This option is incorrect because installing dependencies at runtime can increase latency and is not an efficient approach for real-time inference scenarios.
- D. Incorrect.
This option is incorrect because waiting for the pre-built containers to fail is not a proactive or efficient strategy. Custom containers should be used when you know in advance that pre-built ones do not meet your requirements.