MLA-C01 Question 276
Single answerYou are tasked with deploying a machine learning model on Amazon SageMaker. The model is built using a custom TensorFlow library with specific dependencies not included in the default SageMaker containers. Which of the following approaches would be most appropriate for deploying the model?
- A
Use a SageMaker-provided container for TensorFlow and specify the additional dependencies in the
requirements.txtfile. - B
Build a custom container with the required TensorFlow library and dependencies, and deploy it on SageMaker.
- C
Use a SageMaker-provided container for TensorFlow and include the custom library as part of the model artifacts.
- D
Use a prebuilt third-party container from the AWS Marketplace to deploy the model.
Show answer and explanation
Correct answer: B
Explanation
When deploying a model that relies on custom dependencies or a specific version of a library not supported by SageMaker-provided containers, building a custom container is the appropriate approach. This ensures all required dependencies and configurations are included, allowing seamless deployment on SageMaker.
- A. Incorrect.
This option is incorrect because SageMaker-provided containers cannot be modified to include external libraries or specific TensorFlow versions not supported by the container.
- B. Correct.
This option is correct because building a custom container allows you to include the specific TensorFlow library and custom dependencies needed for the model.
- C. Incorrect.
This option is incorrect because SageMaker-provided containers do not support including custom libraries in the model artifacts. Custom libraries need to be in the container itself.
- D. Incorrect.
This option is incorrect because third-party containers may not include the required custom dependencies and might not be optimized for your specific use case.