2.2.1
| Question | Answer & Explanation |
|---|---|
| ### Question 1 - Choosing the Right SageMaker Built-in Algorithm for Tabular Data A retail company needs to train a binary classification model to predict customer churn based on a large, structured tabular dataset stored in Amazon S3. The data science team has limited engineering resources and wants the most cost-effective solution with the least operational overhead. They prefer not to write custom training loops or manage Docker containers. Which approach satisfies these requirements? - A) Write a custom PyTorch training script using SageMaker Script Mode. - B) Use the Amazon SageMaker XGBoost built-in algorithm. - C) Use the Amazon SageMaker BlazingText built-in algorithm. - D) Build a custom Docker container (BYOC) with scikit-learn and register it in Amazon ECR. (Select ONE) |
Correct Answer: B Correct Answer Analysis: - B is Correct: The SageMaker XGBoost built-in algorithm is specifically optimized for structured/tabular data. Using a built-in algorithm eliminates the need to write custom training loops or manage containers, providing the lowest operational overhead. Distractor Analysis: - A is Incorrect: Using SageMaker Script Mode with PyTorch introduces unnecessary operational overhead for a standard tabular classification task, as it requires writing and maintaining a custom training script. - C is Incorrect: BlazingText is a built-in algorithm designed for natural language processing (NLP) tasks like text classification and word2vec, not structured tabular data. - D is Incorrect: Bringing Your Own Container (BYOC) requires building, testing, pushing, and maintaining a custom Docker image in Amazon ECR, directly violating the constraint of least operational overhead. > Exam Tip / AWS Best Practice: For standard tabular regression or classification tasks, always prefer SageMaker built-in algorithms (like XGBoost or Linear Learner) to minimize operational overhead and infrastructure management. |
| ### Question 2 - Script Mode vs. Built-in Algorithms for Custom Architectures A healthcare startup is training a custom neural network architecture for medical image segmentation. Their codebase is written in PyTorch, and they need full control over the training loop and loss functions. The team wants to minimize container maintenance overhead while utilizing AWS managed infrastructure to run the training jobs. Which approach should the team use to run the training job? - A) Use SageMaker Script Mode with a prebuilt PyTorch Deep Learning Container (DLC). - B) Use the SageMaker Image Classification built-in algorithm. - C) Build a custom Docker container (BYOC) with PyTorch and register it before training. - D) Use Amazon SageMaker Autopilot to automatically train and tune the model. (Select ONE) |
Correct Answer: A Correct Answer Analysis: - A is Correct: SageMaker Script Mode allows you to supply a custom PyTorch script as an entry point while relying on AWS-maintained Deep Learning Containers (DLCs). This provides full control over the custom training loop without the overhead of managing Docker images. Distractor Analysis: - B is Incorrect: The Image Classification built-in algorithm is designed for standard image classification tasks using pre-defined architectures (like ResNet). It does not support custom network architectures or loss functions for segmentation. - C is Incorrect: BYOC requires the team to build, test, push, and maintain custom Docker images in Amazon ECR, which violates the constraint of minimizing container maintenance overhead. - D is Incorrect: SageMaker Autopilot is an AutoML solution meant for tabular data. It does not support custom PyTorch training scripts or complex computer vision tasks like image segmentation. > Exam Tip / AWS Best Practice: When you need custom training logic but want to avoid container maintenance, use SageMaker Script Mode with AWS prebuilt Deep Learning Containers (DLCs). |
| ### Question 3 - Time-Series Forecasting with Built-in Algorithms An e-commerce company needs to forecast the demand for thousands of distinct products based on historical time-series data. The data is currently stored in CSV format in Amazon S3. The engineering team wants to use a SageMaker built-in algorithm to minimize development time and leverage AWS-optimized training. Which built-in algorithm is specifically designed for this use case? - A) Linear Learner - B) DeepAR - C) XGBoost - D) K-Means (Select ONE) |
Correct Answer: B Correct Answer Analysis: - B is Correct: Amazon SageMaker DeepAR is a supervised learning algorithm specifically designed for forecasting scalar one-dimensional time-series data using recurrent neural networks (RNNs). It is highly optimized for handling thousands of related time-series. Distractor Analysis: - A is Incorrect: Linear Learner is a general-purpose supervised learning algorithm for linear models (classification or regression) on tabular data, not specifically optimized for time-series forecasting. - C is Incorrect: XGBoost is a gradient-boosted tree algorithm for tabular data. While it can be forced into time-series problems, it does not natively handle the sequential dependencies of time-series data as effectively as DeepAR. - D is Incorrect: K-Means is an unsupervised clustering algorithm used for grouping unlabelled data, not for forecasting numerical values over time. > Exam Tip / AWS Best Practice: For forecasting one-dimensional time-series data across multiple related entities (e.g., product demand), use the DeepAR built-in algorithm. |
| ### Question 4 - Streaming Large Datasets with Pipe Mode A data science team is training a model using the SageMaker Linear Learner built-in algorithm on a massive 5 TB dataset stored in Amazon S3. They notice the training job takes a long time to initialize because the current configuration downloads the entire dataset to the attached EBS volumes before training begins. The team needs to reduce startup time and optimize the training process with the least operational overhead. How should the team configure the data input to achieve this? - A) Switch the input mode to Pipe using s3:// input with ContentType='text/csv'.- B) Convert the data to RecordIO-protobuf format and keep the input mode as File.- C) Increase the EBS volume size attached to the training instance. - D) Rewrite the data ingestion using a custom PyTorch dataloader in Script Mode. (Select ONE) |
Correct Answer: A Correct Answer Analysis: - A is Correct: Switching to Pipe mode streams data directly from Amazon S3 to the training algorithm container, bypassing the need to download the entire dataset to local EBS storage first. This significantly reduces startup time and disk space requirements for large datasets.Distractor Analysis: - B is Incorrect: Converting to RecordIO-protobuf improves parsing speed but still downloads the entire dataset to local storage when using File mode, failing to address the initialization bottleneck.- C is Incorrect: Increasing EBS volume size only provides more local storage; it does not speed up the time it takes to download 5 TB of data from S3 to the volume before training begins. - D is Incorrect: Rewriting the ingestion with a custom PyTorch dataloader introduces unnecessary operational overhead and abandons the use of the Linear Learner built-in algorithm. > Exam Tip / AWS Best Practice: For large datasets that take too long to download, use SageMaker Pipe mode to stream data directly from S3 to the algorithm container. |
| ### Question 5 - NLP Text Classification with Built-in Algorithms A financial services firm is building an NLP pipeline to categorize customer support tickets into predefined categories. They want to use a SageMaker built-in algorithm to reduce development time and avoid managing custom training code. The dataset consists of short text descriptions and their corresponding category labels. Which built-in algorithm is best suited for this text classification task? - A) BlazingText (Supervised mode) - B) Object2Vec - C) Semantic Segmentation - D) PCA (Select ONE) |
Correct Answer: A Correct Answer Analysis: - A is Correct: The BlazingText built-in algorithm provides highly optimized implementations of the FastText model. In supervised mode, it is specifically designed for text classification tasks, extending the classification labels to short sentences or paragraphs. Distractor Analysis: - B is Incorrect: Object2Vec is a general-purpose neural embedding algorithm used for learning embeddings of pairs of objects (e.g., user-item, sentence-sentence), not specifically optimized for multi-class text classification. - C is Incorrect: Semantic Segmentation is a computer vision algorithm used for pixel-level object detection in images. - D is Incorrect: PCA (Principal Component Analysis) is an unsupervised dimensionality reduction algorithm, not a classification algorithm. > Exam Tip / AWS Best Practice: For fast, cost-effective text classification on short text, use the BlazingText built-in algorithm in supervised mode. |
| ### Question 6 - Unsupervised Topic Modeling A data science team needs to process a large corpus of customer reviews to extract underlying themes without having labeled data. They want to use a SageMaker built-in algorithm to minimize infrastructure management and development time. Which algorithm is appropriate for this unsupervised topic modeling task? - A) Neural Topic Model (NTM) - B) XGBoost - C) Linear Learner - D) K-Nearest Neighbors (KNN) (Select ONE) |
Correct Answer: A Correct Answer Analysis: - A is Correct: The Neural Topic Model (NTM) is an unsupervised learning algorithm designed to organize documents into topics by learning the latent topic distributions. Distractor Analysis: - B is Incorrect: XGBoost is a supervised learning algorithm that requires labeled data for classification or regression tasks. - C is Incorrect: Linear Learner is a supervised learning algorithm for linear models and requires labeled targets. - D is Incorrect: K-Nearest Neighbors (KNN) is an index-based supervised algorithm used for classification or regression, not unsupervised topic extraction. > Exam Tip / AWS Best Practice: For unsupervised topic modeling on text corpora, use the Neural Topic Model (NTM) or Latent Dirichlet Allocation (LDA) built-in algorithms. |
| ### Question 7 - Anomaly Detection Algorithms A manufacturing company has a dataset of sensor readings from industrial equipment and needs to detect anomalies indicating potential machine failure. The data is completely unlabeled. They want to use a SageMaker built-in algorithm to identify these outliers. The solution must require the least operational overhead. Which TWO algorithms can be used for this unsupervised anomaly detection task? (Select TWO) - A) Random Cut Forest (RCF) - B) PCA (Principal Component Analysis) - C) Linear Learner - D) XGBoost (Select TWO) |
Correct Answers: A and B Correct Answer Analysis: - A is Correct: Random Cut Forest (RCF) is an unsupervised algorithm specifically designed by AWS for anomaly detection. It assigns an anomaly score to each data point based on the structural depth in the forest. - B is Correct: PCA (Principal Component Analysis) is an unsupervised dimensionality reduction algorithm. It is frequently used for anomaly detection by measuring the reconstruction error of data points; outliers will have a higher reconstruction error. Distractor Analysis: - C is Incorrect: Linear Learner is a supervised algorithm that requires labeled data to train. - D is Incorrect: XGBoost is a supervised algorithm that requires labeled data for classification or regression. > Exam Tip / AWS Best Practice: For unsupervised anomaly detection, Random Cut Forest (RCF) is the native go-to, while PCA can also be used by analyzing reconstruction errors. |
| ### Question 8 - Hugging Face Custom Training A developer is writing a custom training script using the Hugging Face transformers library for a Named Entity Recognition (NER) task. They want to use Amazon SageMaker to train the model with the least amount of operational overhead for managing the training environment.Which approach should they take? - A) Use SageMaker Script Mode with the Hugging Face Deep Learning Container (DLC). - B) Use the BlazingText built-in algorithm. - C) Use the Object2Vec built-in algorithm. - D) Create a BYOC (Bring Your Own Container) Docker image with the Hugging Face library installed. (Select ONE) |
Correct Answer: A Correct Answer Analysis: - A is Correct: SageMaker provides prebuilt Deep Learning Containers (DLCs) for Hugging Face. Using Script Mode allows you to run custom Hugging Face training scripts using these AWS-maintained containers, minimizing overhead. Distractor Analysis: - B is Incorrect: BlazingText is a built-in algorithm for text classification or word2vec, but it does not support complex Transformer architectures or the Hugging Face transformers library.- C is Incorrect: Object2Vec is an embedding algorithm and does not support the NER sequence labeling task out-of-the-box. - D is Incorrect: Creating a BYOC requires building, testing, and maintaining a custom Docker image in ECR, violating the least operational overhead constraint. > Exam Tip / AWS Best Practice: For custom Hugging Face or PyTorch/TF scripts, always check for a prebuilt AWS DLC and use SageMaker Script Mode before resorting to building a custom container. |
| ### Question 9 - Recommendation Systems with Built-in Algorithms A media company wants to build a recommendation system using collaborative filtering on a dataset of user-item interactions (e.g., user watch history). They want to use a SageMaker built-in algorithm to handle the high-dimensional sparse data typical of recommendation problems. Which built-in algorithm is specifically designed for this task? - A) Factorization Machines - B) K-Means - C) PCA - D) LDA (Latent Dirichlet Allocation) (Select ONE) |
Correct Answer: A Correct Answer Analysis: - A is Correct: Factorization Machines are a supervised learning algorithm designed to capture interactions between variables in sparse datasets, making them ideal for recommendation systems and click prediction tasks. Distractor Analysis: - B is Incorrect: K-Means is an unsupervised clustering algorithm used to group data points, not for predicting user-item interactions. - C is Incorrect: PCA is an unsupervised dimensionality reduction algorithm, not used for predictive recommendation tasks. - D is Incorrect: LDA is an unsupervised algorithm used for topic modeling on text data, not for user-item recommendation. > Exam Tip / AWS Best Practice: For supervised learning on high-dimensional sparse data like user-item interactions, use the SageMaker Factorization Machines built-in algorithm. |
| ### Question 10 - Hyperparameter Tuning with Built-in Algorithms An organization is using the SageMaker K-Means built-in algorithm to cluster customers into behavioral segments. The data scientists want to optimize the hyperparameters, specifically the k value (number of clusters) and extra_center_factor, using SageMaker Automatic Model Tuning (AMT) to find the configuration with the lowest mean square distance.What must they configure in the tuning job? - A) Define the hyperparameter ranges and an objective metric (e.g., test:msd) for the tuning job.- B) Manually calculate the optimal k value using the Elbow method before passing it as a static hyperparameter.- C) Use a random search strategy without defining an objective metric. - D) Write a custom metric definition script to parse the logs for training loss, as K-Means does not emit metrics natively. (Select ONE) |
Correct Answer: A Correct Answer Analysis: - A is Correct: SageMaker K-Means natively emits metrics like test:msd (mean square distance) to CloudWatch. To use AMT, you simply define the hyperparameter ranges and specify the built-in objective metric to minimize.Distractor Analysis: - B is Incorrect: The purpose of AMT is to automate the search across hyperparameter ranges. Manually calculating k defeats the purpose of using automatic model tuning.- C is Incorrect: AMT requires an objective metric to evaluate the performance of each training job. A random search without an objective metric cannot determine the "best" model. - D is Incorrect: K-Means is a built-in algorithm that emits its metrics natively to CloudWatch. It does not require a custom metric definition script like Script Mode often does. > Exam Tip / AWS Best Practice: SageMaker built-in algorithms automatically emit metrics to CloudWatch (e.g., test:msd for K-Means, validation:accuracy for XGBoost), allowing you to easily use them as objective metrics for Automatic Model Tuning. |