Practice Free MLA-C01 Exam Online Questions
A company has developed a new ML model. The company requires online model validation on 10% of the traffic before the company fully releases the model in production. The company uses an Amazon SageMaker endpoint behind an Application Load Balancer (ALB) to serve the model.
Which solution will set up the required online validation with the LEAST operational overhead?
- A . Use production variants to add the new model to the existing SageMaker endpoint. Set the variant weight to 0.1 for the new model. Monitor the number of invocations by using Amazon CloudWatch.
- B . Use production variants to add the new model to the existing SageMaker endpoint. Set the variant weight to 1 for the new model. Monitor the number of invocations by using Amazon CloudWatch.
- C . Create a new SageMaker endpoint. Use production variants to add the new model to the new endpoint. Monitor the number of invocations by using Amazon CloudWatch.
- D . Configure the ALB to route 10% of the traffic to the new model at the existing SageMaker endpoint. Monitor the number of invocations by using AWS CloudTrail.
A
Explanation:
Scenario: The company wants to perform online validation of a new ML model on 10% of the traffic before fully deploying the model in production. The setup must have minimal operational overhead.
Why Use SageMaker Production Variants?
Built-In Traffic Splitting: Amazon SageMaker endpoints support production variants, allowing multiple models to run on a single endpoint. You can direct a percentage of incoming traffic to each variant by adjusting the variant weights.
Ease of Management: Using production variants eliminates the need for additional infrastructure like separate endpoints or custom ALB configurations.
Monitoring with CloudWatch: SageMaker automatically integrates with CloudWatch, enabling real-time monitoring of model performance and invocation metrics.
Steps to Implement:
Deploy the New Model as a Production Variant:
Update the existing SageMaker endpoint to include the new model as a production variant. This can be done via the SageMaker console, CLI, or SDK.
Example SDK Code:
import boto3
sm_client = boto3.client(‘sagemaker’)
response = sm_client.update_endpoint_weights_and_capacities(
EndpointName=’existing-endpoint-name’,
DesiredWeightsAndCapacities=[
{‘VariantName’: ‘current-model’, ‘DesiredWeight’: 0.9},
{‘VariantName’: ‘new-model’, ‘DesiredWeight’: 0.1}
]
)
Set the Variant Weight:
Assign a weight of 0.1 to the new model and 0.9 to the existing model. This ensures 10% of traffic goes to the new model while the remaining 90% continues to use the current model.
Monitor the Performance:
Use Amazon CloudWatch metrics, such as Invocation Count and Model Latency, to monitor the traffic and performance of each variant.
Validate the Results:
Analyze the performance of the new model based on metrics like accuracy, latency, and failure rates.
Why Not the Other Options?
Option B: Setting the weight to 1 directs all traffic to the new model, which does not meet the requirement of splitting traffic for validation.
Option C: Creating a new endpoint introduces additional operational overhead for traffic routing and monitoring, which is unnecessary given SageMaker’s built-in production variant capability.
Option D: Configuring the ALB to route traffic requires manual setup and lacks SageMaker’s seamless variant monitoring and traffic splitting features.
Conclusion:
Using production variants with a weight of 0.1 for the new model on the existing SageMaker endpoint provides the required traffic split for online validation with minimal operational overhead.
Reference: Amazon SageMaker Endpoints
SageMaker Production Variants
Monitoring SageMaker Endpoints with CloudWatch
A company needs to host a custom ML model to perform forecast analysis. The forecast analysis will occur with predictable and sustained load during the same 2-hour period every day.
Multiple invocations during the analysis period will require quick responses. The company needs AWS to manage the underlying infrastructure and any auto scaling activities.
Which solution will meet these requirements?
- A . Schedule an Amazon SageMaker batch transform job by using AWS Lambda.
- B . Configure an Auto Scaling group of Amazon EC2 instances to use scheduled scaling.
- C . Use Amazon SageMaker Serverless Inference with provisioned concurrency.
- D . Run the model on an Amazon Elastic Kubernetes Service (Amazon EKS) cluster on Amazon EC2 with pod auto scaling.
C
Explanation:
SageMaker Serverless Inference is ideal for workloads with predictable, intermittent demand. By enabling provisioned concurrency, the model can handle multiple invocations quickly during the high-demand 2-hour period. AWS manages the underlying infrastructure and scaling, ensuring the solution meets performance requirements with minimal operational overhead. This approach is cost-effective since it scales down when not in use.
An ML engineer is training a simple neural network model. The model’s performance improves initially and then degrades after a certain number of epochs.
Which solutions will mitigate this problem? (Select TWO.)
- A . Enable early stopping on the model.
- B . Increase dropout in the layers.
- C . Increase the number of layers.
- D . Increase the number of neurons.
- E . Investigate and reduce the sources of model bias.
A,B
Explanation:
The described behavior indicates overfitting, where the model starts to memorize training data instead of generalizing.
Early stopping halts training when validation performance stops improving, preventing the model from overfitting further. AWS documentation recommends early stopping as a primary regularization technique.
Dropout randomly disables neurons during training, forcing the model to learn robust representations and reducing reliance on specific neurons. Increasing dropout is a well-established method for improving generalization.
Increasing layers or neurons increases model capacity and worsens overfitting. Model bias is unrelated to epoch-based degradation.
Therefore, Options A and B are correct.
An ML engineer is analyzing a classification dataset before training a model in Amazon SageMaker AI. The ML engineer suspects that the dataset has a significant imbalance between class labels that could lead to biased model predictions. To confirm class imbalance, the ML engineer needs to select an appropriate pre-training bias metric.
Which metric will meet this requirement?
- A . Mean squared error (MSE)
- B . Difference in proportions of labels (DPL)
- C . Silhouette score
- D . Structural similarity index measure (SSIM)
B
Explanation:
In Amazon SageMaker AI, identifying bias in machine learning datasets before model training is a critical step to ensure fairness and reliability of predictions. This process is referred to as pre-training bias analysis, and it focuses on understanding whether the training data itself introduces bias― particularly through imbalanced class labels or sensitive attributes.
The Difference in Proportions of Labels (DPL) is a pre-training bias metric specifically designed to measure class imbalance. DPL compares the proportion of a specific label (such as a positive outcome) across different groups or classes within a dataset. If one class or group is overrepresented relative to another, the DPL value will deviate significantly from zero, clearly indicating imbalance. AWS documentation highlights DPL as a key metric used by SageMaker Clarify to detect label imbalance prior to model training.
By contrast, Mean Squared Error (MSE) is a regression evaluation metric used after model training to measure prediction error, not dataset bias. Silhouette score is an unsupervised learning metric used to evaluate clustering quality, making it irrelevant for supervised classification bias detection.
Structural Similarity Index Measure (SSIM) is an image-quality metric used in computer vision tasks and has no application in dataset bias analysis.
Using DPL allows ML engineers to proactively detect and address skewed label distributions―such as by re-sampling, re-weighting, or collecting additional data―before training begins. This aligns with
AWS best practices for responsible AI and helps reduce the risk of biased predictions that could negatively impact real-world decision-making.
Therefore, Difference in Proportions of Labels (DPL) is the correct and AWS-recommended metric for confirming class imbalance during pre-training bias analysis in Amazon SageMaker AI.
An ML engineer is designing an AI-powered traffic management system. The system must use near real-time inference to predict congestion and prevent collisions.
The system must also use batch processing to perform historical analysis of predictions over several hours to improve the model. The inference endpoints must scale automatically to meet demand.
Which combination of solutions will meet these requirements? (Select TWO.)
- A . Use Amazon SageMaker real-time inference endpoints with automatic scaling based on ConcurrentInvocationsPerInstance.
- B . Use AWS Lambda with reserved concurrency and SnapStart to connect to SageMaker endpoints.
- C . Use an Amazon SageMaker Processing job for batch historical analysis. Schedule the job with Amazon EventBridge.
- D . Use Amazon EC2 Auto Scaling to host containers for batch analysis.
- E . Use AWS Lambda for historical analysis.
A,C
Explanation:
For near real-time predictions, AWS documentation recommends Amazon SageMaker real-time inference endpoints. These endpoints support automatic scaling based on metrics such as ConcurrentInvocationsPerInstance, ensuring low latency and high availability during traffic spikes.
For long-running historical analysis, SageMaker Processing jobs are the appropriate solution. Processing jobs are designed for batch workloads, can run for hours, and integrate cleanly with SageMaker pipelines. Scheduling them with Amazon EventBridge provides a fully managed, scalable, and serverless solution.
AWS Lambda is unsuitable for multi-hour workloads. EC2 Auto Scaling adds unnecessary infrastructure management overhead.
Therefore, Options A and C together meet all requirements and align with AWS best practices.
A company wants to improve the sustainability of its ML operations.
Which actions will reduce the energy usage and computational resources that are associated with the company’s training jobs? (Choose two.)
- A . Use Amazon SageMaker Debugger to stop training jobs when non-converging conditions are detected.
- B . Use Amazon SageMaker Ground Truth for data labeling.
- C . Deploy models by using AWS Lambda functions.
- D . Use AWS Trainium instances for training.
- E . Use PyTorch or TensorFlow with the distributed training option.
A,D
Explanation:
SageMaker Debugger can identify when a training job is not converging or is stuck in a non-productive state. By stopping these jobs early, unnecessary energy and computational resources are conserved, improving sustainability.
AWS Trainium instances are purpose-built for ML training and are optimized for energy efficiency and cost-effectiveness. They use less energy per training task compared to general-purpose instances,
making them a sustainable choice.
An ML engineer at a credit card company built and deployed an ML model by using Amazon SageMaker AI. The model was trained on transaction data that contained very few fraudulent transactions. After deployment, the model is underperforming.
What should the ML engineer do to improve the model’s performance?
- A . Retrain the model with a different SageMaker built-in algorithm.
- B . Use random undersampling to reduce the majority class and retrain the model.
- C . Use Synthetic Minority Oversampling Technique (SMOTE) to generate synthetic minority samples and retrain the model.
- D . Use random oversampling to duplicate minority samples and retrain the model.
C
Explanation:
This is a classic class imbalance problem, where fraudulent transactions (minority class) are severely underrepresented. AWS documentation for SageMaker Data Wrangler recommends SMOTE (Synthetic Minority Oversampling Technique) as an effective approach for improving model performance in such scenarios.
SMOTE generates synthetic minority samples by interpolating between existing minority class examples. This improves the model’s ability to learn decision boundaries without simply duplicating data, which can cause overfitting.
Random undersampling removes valuable majority class data, reducing overall model robustness. Random oversampling duplicates data and increases overfitting risk. Changing algorithms does not address the root cause.
AWS best practices highlight SMOTE as the preferred technique for fraud detection and other highly imbalanced datasets.
Therefore, Option C is the correct and AWS-verified answer.
A company has deployed an ML model that detects fraudulent credit card transactions in real time in a banking application. The model uses Amazon SageMaker Asynchronous Inference. Consumers are reporting delays in receiving the inference results.
An ML engineer needs to implement a solution to improve the inference performance. The solution also must provide a notification when a deviation in model quality occurs.
Which solution will meet these requirements?
- A . Use SageMaker real-time inference for inference. Use SageMaker Model Monitor for notifications about model quality.
- B . Use SageMaker batch transform for inference. Use SageMaker Model Monitor for notifications about model quality.
- C . Use SageMaker Serverless Inference for inference. Use SageMaker Inference Recommender for notifications about model quality.
- D . Keep using SageMaker Asynchronous Inference for inference. Use SageMaker Inference Recommender for notifications about model quality.
A
Explanation:
SageMaker real-time inference is designed for low-latency, real-time use cases, such as detecting fraudulent transactions in banking applications. It eliminates the delays associated with SageMaker Asynchronous Inference, improving inference performance.
SageMaker Model Monitor provides tools to monitor deployed models for deviations in data quality, model performance, and other metrics. It can be configured to send notifications when a deviation in model quality is detected, ensuring the system remains reliable.
An ML engineer has developed a binary classification model outside of Amazon SageMaker. The ML engineer needs to make the model accessible to a SageMaker Canvas user for additional tuning.
The model artifacts are stored in an Amazon S3 bucket. The ML engineer and the Canvas user are part of the same SageMaker domain.
Which combination of requirements must be met so that the ML engineer can share the model with the Canvas user? (Choose two.)
- A . The ML engineer and the Canvas user must be in separate SageMaker domains.
- B . The Canvas user must have permissions to access the S3 bucket where the model artifacts are stored.
- C . The model must be registered in the SageMaker Model Registry.
- D . The ML engineer must host the model on AWS Marketplace.
- E . The ML engineer must deploy the model to a SageMaker endpoint.
B,C
Explanation:
The SageMaker Canvas user needs permissions to access the Amazon S3 bucket where the model artifacts are stored to retrieve the model for use in Canvas.
Registering the model in the SageMaker Model Registry allows the model to be tracked and managed within the SageMaker ecosystem. This makes it accessible for tuning and deployment through SageMaker Canvas.
This combination ensures proper access control and integration within SageMaker, enabling the Canvas user to work with the model.
An ML engineer trained an ML model on Amazon SageMaker to detect automobile accidents from dosed-circuit TV footage. The ML engineer used SageMaker Data Wrangler to create a training dataset of images of accidents and non-accidents.
The model performed well during training and validation. However, the model is underperforming in production because of variations in the quality of the images from various cameras.
Which solution will improve the model’s accuracy in the LEAST amount of time?
- A . Collect more images from all the cameras. Use Data Wrangler to prepare a new training dataset.
- B . Recreate the training dataset by using the Data Wrangler corrupt image transform. Specify the impulse noise option.
- C . Recreate the training dataset by using the Data Wrangler enhance image contrast transform.
Specify the Gamma contrast option. - D . Recreate the training dataset by using the Data Wrangler resize image transform. Crop all images to the same size.
B
Explanation:
The model is underperforming in production due to variations in image quality from different cameras. Using the corrupt image transform with the impulse noise option in SageMaker Data Wrangler simulates real-world noise and variations in the training dataset. This approach helps the model become more robust to inconsistencies in image quality, improving its accuracy in production without the need to collect and process new data, thereby saving time.
