Skip to Content

Amazon AWS Certified Machine Learning – Specialty: What is the best way to package a scikit-learn model in container on AWS for crop yield forecasting?

Learn how to package a scikit-learn crop yield forecasting model in a container on AWS while letting AWS handle container maintenance. Compare Amazon SageMaker, Amazon ECR, and custom container options.

Table of Contents

Question

An agriculture company wants to improve crop yield forecasting for the upcoming season by using crop yields from the last three seasons. The company wants to compare the performance of its new scikit-learn model to the benchmark.

A data scientist needs to package the code into a container that computes both the new model forecast and the benchmark. The data scientist wants AWS to be responsible for the operational maintenance of the container.

Which solution will meet these requirements?

A. Package the code as the training script for an Amazon SageMaker scikit-learn container.
B. Package the code into a custom-built container. Push the container to Amazon Elastic Container Registry (Amazon ECR).
C. Package the code into a custom-built container. Push the container to AWS Fargate.
D. Package the code by extending an Amazon SageMaker scikit-learn container.

Answer

The best solution is to package the code by extending an Amazon SageMaker scikit-learn container (Option D).

D. Package the code by extending an Amazon SageMaker scikit-learn container.

Explanation

The requirements are to 1) package the scikit-learn model code into a container that computes both the new model and benchmark, and 2) have AWS be responsible for the container’s operational maintenance.

Extending an Amazon SageMaker scikit-learn container meets both criteria:

  1. It allows you to package your custom scikit-learn code in a container. The container can include the logic for both the new model and the benchmark.
  2. By using a SageMaker container, AWS takes responsibility for maintaining the underlying container infrastructure, OS, libraries, etc. You just need to focus on your model code.

The other options are not ideal:

A. A SageMaker training script is for model training, not deploying a trained model for inference. It wouldn’t contain the benchmark logic.

B. Pushing a custom container to Amazon ECR would require you to maintain the container yourself. AWS would just store the container image.

C. Pushing to AWS Fargate is for running arbitrary containers, not hosting ML models. You’d be responsible for container maintenance.

So in summary, extending a SageMaker scikit-learn container provides a clean way to package the forecasting and benchmark code while offloading container maintenance to AWS, making it the best fit for the agriculture company’s requirements. The data scientist can focus on the model logic and let AWS handle the underlying container ops.

Amazon AWS Certified Machine Learning – Specialty certification exam assessment practice question and answer (Q&A) dump including multiple choice questions (MCQ) and objective type questions, with detail explanation and reference available free, helpful to pass the Amazon AWS Certified Machine Learning – Specialty exam and earn Amazon AWS Certified Machine Learning – Specialty certification.