AWS Certified Machine Learning – Specialty — Question 86
A Machine Learning Specialist previously trained a logistic regression model using scikit-learn on a local machine, and the Specialist now wants to deploy it to production for inference only.
What steps should be taken to ensure Amazon SageMaker can host a model that was trained locally?
Answer options
- A. Build the Docker image with the inference code. Tag the Docker image with the registry hostname and upload it to Amazon ECR.
- B. Serialize the trained model so the format is compressed for deployment. Tag the Docker image with the registry hostname and upload it to Amazon S3.
- C. Serialize the trained model so the format is compressed for deployment. Build the image and upload it to Docker Hub.
- D. Build the Docker image with the inference code. Configure Docker Hub and upload the image to Amazon ECR.
Correct answer: A
Explanation
The correct answer is A because it outlines the necessary steps to create a Docker image that can be used for inference and specifies tagging and uploading to Amazon ECR, which is required for SageMaker integration. Options B and C incorrectly suggest using Amazon S3 and Docker Hub without addressing the need for a Docker image suitable for SageMaker, while option D suggests configuring Docker Hub, which is not necessary when using Amazon ECR.