0
0
MLOpsdevops~20 mins

A/B testing model versions in MLOps - Practice Problems & Coding Challenges

Choose your learning style9 modes available
Challenge - 5 Problems
🎖️
A/B Testing Mastery
Get all challenges correct to earn this badge!
Test your skills under time pressure!
🧠 Conceptual
intermediate
2:00remaining
Understanding A/B Testing Traffic Split

You want to run an A/B test for two model versions: v1 and v2. You configure the traffic split as 70% to v1 and 30% to v2. What will happen to incoming user requests?

A70% of user requests will be served by model v1, and 30% by model v2.
BAll user requests will be served by model v1 until 70 requests are served, then switch to v2.
COnly 30% of users will get any response, the rest will be dropped.
DUser requests will be randomly served by either model without respecting the 70/30 ratio.
Attempts:
2 left
💡 Hint

Think about how traffic splitting works in A/B testing to distribute load.

💻 Command Output
intermediate
2:00remaining
Interpreting A/B Test Metrics Output

You run an A/B test comparing model v1 and v2. The output metrics show:

{"v1_accuracy": 0.85, "v2_accuracy": 0.88, "v1_requests": 700, "v2_requests": 300}

What does this output tell you?

AModel v1 has higher accuracy and more requests; traffic split is 50/50.
BBoth models have the same accuracy; traffic split is incorrect.
CModel v2 has higher accuracy but fewer requests; traffic split matches 70/30 ratio.
DModel v2 has lower accuracy but more requests; traffic split is reversed.
Attempts:
2 left
💡 Hint

Look at accuracy values and request counts carefully.

Configuration
advanced
3:00remaining
Configuring Canary Deployment for Model Version

You want to deploy a new model version v3 as a canary with 10% traffic, while 90% remains on v2. Which YAML snippet correctly configures this traffic split in a Kubernetes service mesh?

A
apiVersion: networking.istio.io/v1alpha3
kind: VirtualService
spec:
  http:
  - route:
    - destination:
        host: model-service
        subset: v3
      weight: 50
    - destination:
        host: model-service
        subset: v2
      weight: 50
B
apiVersion: networking.istio.io/v1alpha3
kind: VirtualService
spec:
  http:
  - route:
    - destination:
        host: model-service
        subset: v3
      weight: 90
    - destination:
        host: model-service
        subset: v2
      weight: 10
C
apiVersion: networking.istio.io/v1alpha3
kind: VirtualService
spec:
  http:
  - route:
    - destination:
        host: model-service
        subset: v2
      weight: 10
    - destination:
        host: model-service
        subset: v3
      weight: 90
D
apiVersion: networking.istio.io/v1alpha3
kind: VirtualService
spec:
  http:
  - route:
    - destination:
        host: model-service
        subset: v2
      weight: 90
    - destination:
        host: model-service
        subset: v3
      weight: 10
Attempts:
2 left
💡 Hint

Remember weights must add up to 100 and match the desired traffic percentages.

Troubleshoot
advanced
3:00remaining
Diagnosing A/B Test Data Skew

After running an A/B test for 24 hours, you notice model v2 received 80% of traffic instead of the configured 50%. What is the most likely cause?

AThe monitoring tool aggregated data incorrectly, actual traffic was 50/50.
BThe traffic routing configuration was updated incorrectly, causing uneven weights.
CUser sessions were sticky, causing repeated routing to v2 for returning users.
DModel v1 crashed, so all traffic was rerouted to v2 automatically.
Attempts:
2 left
💡 Hint

Consider what controls traffic distribution and what might cause imbalance.

🔀 Workflow
expert
3:00remaining
Order of Steps in A/B Testing Model Deployment

Arrange the following steps in the correct order to perform a safe A/B test deployment of a new model version:

  1. Analyze test results and decide winner
  2. Deploy new model version alongside existing
  3. Configure traffic split between old and new versions
  4. Monitor performance and collect metrics
A1,2,3,4
B2,1,3,4
C1,3,2,4
D2,3,1,4
Attempts:
2 left
💡 Hint

Think about the logical flow from deployment to decision.