AWS Certified Machine Learning Engineer - Associate (MLA-C02) free question 8 / 10 · Domain 4: Operating, Monitoring, and Securing ML and AI Solutions
A team deploys two production variants on one SageMaker AI endpoint to run an A/B test. Variant1 has a weight of 3 and Variant2 has a weight of 1, and the callers do not name a variant in their requests. How is the traffic split?
- Variant2 gets 75% of the requests and Variant1 gets 25%, with a lower weight marking the preferred variant
- 75% of the requests go to Variant1 and 25% go to Variant2, in proportion to the weights
- The traffic is split 50/50, and the weights set the order of the variants
- Requests go to Variant1 until its instances are busy, and then spill over to Variant2
Show the answer and explanation
Answer: B
Why this is correct
When you test models with production variants, you specify the percentage of traffic that gets routed to each model by giving each production variant a weight in the endpoint configuration. SageMaker AI divides each variant's weight by the sum of the weights. In the page's example both variants have an initial weight of 1, so the sum is 2 and each variant receives 1/2, or 50%, of the traffic. With weights of 3 and 1 the sum is 4, so Variant1 receives 3/4 (75%) of the requests and Variant2 receives 1/4 (25%).
Why the other options are wrong
"The traffic is split 50/50, and the weights set the order of the variants" … The weights are not an order of evaluation. Each variant receives its weight divided by the sum of the weights, so equal weights of 1 give 1/2, or 50%, to each variant.
"Requests go to Variant1 until its instances are busy, and then spill over to Variant2" … The documentation describes the weight as the percentage of traffic routed to each production variant. It does not describe an overflow from one variant to the next.
"Variant2 gets 75% of the requests and Variant1 gets 25%, with a lower weight marking the preferred variant" … A larger weight gives a variant a larger share of the traffic. In the page's own example, moving the weights to 25 and 75 sends 75% of the requests to the variant with the weight of 75.
Key points
The inference response contains the name of the production variant that processed the request, so you can see how the traffic divides. SageMaker AI also emits metrics such as Latency and Invocations for each variant in Amazon CloudWatch, which lets you compare the variants.