Medium MLA-C01 practice questions
Applied — put a concept to work in a realistic situation. 169 medium questions available — no sign-up, always free.
A data scientist is training a deep neural network on a sparse text-classification dataset using SageMaker. Training with plain stochastic gradient descent (SGD) at a fixed learning rate converges very slowly, and different features clearly need different effective learning rates because some tokens appear frequently while others are rare. The team wants an optimizer that adapts the per-parameter learning rate automatically to speed up convergence without extensive manual learning-rate tuning. Which optimizer change best addresses this need?
A media company deploys a document-processing model that accepts PDF uploads up to 500 MB and can take several minutes per request to run OCR and summarization. Requests arrive in unpredictable bursts, and during idle periods the team wants to avoid paying for running instances. Clients do not need an immediate synchronous response and can poll for results. Which SageMaker deployment option best fits these requirements?
A data science team stores raw event logs as compressed JSON in Amazon S3. They repeatedly run the same complex SQL aggregation in Amazon Athena to build a feature table for model training, and each run scans hundreds of gigabytes, causing high query costs and slow iteration. They want a repeatable, cost-efficient way to persist the engineered feature dataset in an analytics-friendly format for downstream SageMaker training jobs. Which approach best meets these requirements with the least ongoing operational overhead?
A data scientist trains a binary classifier to predict whether a customer will churn. Only 4% of customers in the dataset actually churn. The initial model reports 96% accuracy on the validation set, but the business complains that almost no real churners are being flagged. Which evaluation approach should the data scientist adopt to properly assess and compare model performance for this problem?
A retail company retrains a churn-prediction model weekly. Every night, they need to generate churn scores for their entire customer base of 40 million records stored as Parquet files in S3. The scoring job must complete before business hours, but there is no requirement for individual real-time predictions during the day. The ML engineer wants the most cost-effective deployment approach that avoids paying for idle compute. Which SageMaker deployment option should the engineer choose?
A data scientist trains a binary classifier that flags manufacturing defects. The training set contains 4% defective units. The initial model achieves 96% accuracy but misses most defects during validation. Management requires that the model catch as many true defects as possible while keeping false alarms manageable, and they want a single metric that balances both concerns for model selection. Which evaluation metric should the team optimize?
A machine learning team runs a production SageMaker real-time endpoint serving a recommendation model. They need to deploy a new model version but are concerned that a faulty version could cause a spike in inference errors affecting customers. They want SageMaker to automatically shift traffic to the new version gradually, monitor CloudWatch metrics during the shift, and automatically roll back to the previous version if error thresholds are breached. Which approach should they configure?
A machine learning engineer is training a neural network in a SageMaker training job to classify support tickets into 12 mutually exclusive categories. The labels are provided as integer class indices (0 through 11) rather than one-hot encoded vectors. The final layer uses a softmax activation with 12 units. During training, the loss function raises a shape-mismatch error expecting the target to have the same shape as the model output. Which change resolves the error with the least preprocessing effort?
An ML engineering team deploys SageMaker real-time endpoints across development, staging, and production accounts. Currently each environment is provisioned manually through the console, causing configuration drift and inconsistent instance types between accounts. The team wants a programmatic, version-controlled way to define the endpoint infrastructure using a familiar general-purpose programming language (TypeScript), reuse the same construct across all three accounts, and integrate the deployment into their existing CI/CD pipeline. Which approach best meets these requirements?
A machine learning platform team wants to define their SageMaker infrastructure (endpoints, endpoint configs, and IAM roles) as code. The team is composed of Python developers who want to use loops, conditionals, and reusable classes to generate the infrastructure definitions, while still deploying through AWS's native provisioning and rollback engine. Which approach best meets these requirements?
A security team wants to detect unusual patterns in network traffic logs to flag potential intrusions. The dataset contains millions of unlabeled records with numeric features such as packet count, byte volume, and connection duration. The team has no labeled examples of attacks and needs a scalable SageMaker built-in algorithm that can identify statistical outliers in this high-dimensional data. Which algorithm best fits this requirement?
A retail company wants to forecast weekly product demand across 5,000 store-item combinations. The dataset includes historical sales, promotional flags, holiday calendars, and price changes. The team needs a single model that can produce probabilistic forecasts (with prediction intervals) for all series simultaneously and learn shared patterns across related items. Which SageMaker built-in algorithm best fits this requirement?
A retail company wants to build an image classifier that identifies which of 40 product categories appears in a photo. They have only about 3,000 labeled images total (roughly 75 per category) and limited GPU budget. The ML team needs the fastest path to a reasonably accurate model without collecting more labeled data. Which modeling approach best fits this situation?
A data science team at a real estate company needs to predict house sale prices from a tabular dataset containing 40 numeric and categorical features and about 120,000 rows. The relationships between features and price are highly non-linear, and the team wants strong predictive accuracy with minimal feature engineering while training efficiently on SageMaker. Which modeling approach should they choose?
A media company wants to test five different article headline variants on its homepage to maximize click-through rate. The traffic is high, and business stakeholders want to minimize the number of impressions wasted on clearly underperforming headlines while the test is running, dynamically shifting more traffic toward better-performing variants as evidence accumulates. Which modeling approach best fits this requirement?
A manufacturing company trains an XGBoost binary classifier in SageMaker to detect defective parts on an assembly line. Only 1.5% of parts are defective. The initial model achieves 98.5% accuracy but misses nearly all defective parts, which is unacceptable because undetected defects cause costly recalls. The team wants to improve the model's ability to catch defects while keeping the training pipeline simple and avoiding synthetic data generation. Which approach BEST addresses this problem?
A team manages a SageMaker real-time endpoint entirely through a CloudFormation stack that is deployed identically across dev, staging, and production. During an incident, an on-call engineer manually changed the production endpoint's instance count and instance type through the SageMaker console to handle a traffic surge. Later, the team wants to programmatically detect whether the running production resources still match what the CloudFormation template declares, before running their next stack update. Which approach lets them identify these out-of-band changes with the least custom effort?
A financial services company must maintain a tamper-evident audit trail of all administrative API calls made against its SageMaker resources (creating endpoints, updating endpoint configs, deleting models) across every AWS Region. The compliance team needs to detect any unauthorized configuration changes and be able to query historical activity months later. Which approach best meets these requirements?
An ML engineer runs a fraud-detection endpoint monitored by two SageMaker Model Monitor jobs: one for data quality drift and one for model quality (accuracy) degradation. Each job publishes a CloudWatch metric, and separate CloudWatch alarms already trigger an automated retraining pipeline via EventBridge. The team complains that during noisy input spikes, the data-quality alarm fires transient alerts and needlessly launches expensive retraining jobs, even when model accuracy is still acceptable. They want retraining to be triggered only when BOTH drift is detected AND accuracy has actually degraded, without deleting the existing individual alarms used for dashboards. What is the most operationally efficient way to meet this requirement?
A company hosts several real-time SageMaker endpoints for internal analytics teams. The ML platform lead notices the monthly inference bill has grown steadily, but many endpoints show very low invocation counts during business hours and none overnight. The lead wants an automated, low-effort way to identify underutilized endpoints so that the team can decommission or consolidate them, while avoiding manual review of each endpoint. Which approach best meets this goal?
A machine learning engineer operates a real-time SageMaker endpoint serving a recommendation model. Recently, downstream applications have reported intermittent failures. The engineer wants to be automatically notified whenever the endpoint returns a sustained elevated rate of server-side errors (HTTP 5xx) so the on-call team can respond quickly. Which approach requires the least custom instrumentation to meet this requirement?
A machine learning engineer manages a real-time SageMaker endpoint serving a recommendation model. Business stakeholders complain that during peak hours the recommendations feel slow, but the endpoint's average latency in CloudWatch looks acceptable. The engineer needs to detect and alert on the tail-latency experienced by the slowest requests so the team can react before customers are affected. Which CloudWatch approach best addresses this requirement?
A retail company runs three SageMaker real-time endpoints, each with Model Monitor data-quality schedules that emit violation counts as CloudWatch metrics. The operations team wants a single view where on-call engineers can see current drift violation counts across all three endpoints side by side, without navigating to each endpoint separately, and share it with stakeholders. Which approach requires the least custom code and best meets this requirement?
A data science team must build a text-classification model to route incoming support tickets into 12 categories. They have only 400 labeled tickets total but millions of unlabeled historical tickets. Management wants the highest accuracy possible while minimizing new labeling effort. Which modeling approach best fits this situation?
A data science team trains a new version of a customer churn classifier weekly. Each version is registered as a new model package version in an existing SageMaker Model Registry model package group. Before promoting a new version to production, the team must compare its offline evaluation metrics (AUC, F1) against the currently approved production version and record the decision, keeping a full history of which version was approved and by whom. Which approach best meets these requirements with the least custom development?