MLA-C01 Question 278
Single answerYou are building a machine learning model using Amazon SageMaker, and your team has decided to use a custom algorithm that is not available in SageMaker's built-in algorithms. Additionally, you need to include specific dependencies and pre-processing steps in your environment. Which container option should you choose?
- A
Use a SageMaker pre-built container for built-in algorithms
- B
Use a SageMaker pre-built container and pass the algorithm as a script
- C
Create and use a custom container with the required dependencies and pre-processing logic
- D
Use the SageMaker pre-built container for XGBoost
Show answer and explanation
Correct answer: C
Explanation
When working with custom algorithms or when your environment requires specific dependencies that are not supported by SageMaker's pre-built containers, creating and using a custom container is the appropriate choice. This approach provides flexibility to package your algorithm, dependencies, and pre-processing logic into a single container image, ensuring compatibility with your requirements.
- A. Incorrect.
SageMaker pre-built containers for built-in algorithms are designed for commonly used models provided by SageMaker, such as Linear Learner or XGBoost. They are not suitable for custom algorithms or specific dependencies.
- B. Incorrect.
Passing an algorithm as a script is applicable if you are using SageMaker Script Mode with a pre-built container. However, this option does not allow for the inclusion of custom dependencies or extensive pre-processing logic.
- C. Correct.
Creating and using a custom container is the correct approach when your use case involves a custom algorithm, additional dependencies, or specific pre-processing steps that are not supported by the pre-built containers.
- D. Incorrect.
The pre-built container for XGBoost is specific to the XGBoost algorithm provided by SageMaker. It is not suitable for custom algorithms or unique dependencies.