Champion challenger and shadow
Quick answer
The champion is the current approved serving version. A challenger is an alternative candidate. Shadow testing replays or mirrors eligible inputs to the challenger without allowing its predictions to determine user-facing actions. Compare paired outputs and resource consumption before exposing any candidate decisions. Examples use dependency-free Python with small synthetic inputs. ByteMind execution is unverified.
Paired shadow predictions
y=[0,1,1,0]; champion=[0,0,1,0]; challenger=[0,1,1,0]print(sum(a==b for a,b in zip(y,champion)),sum(a==b for a,b in zip(y,challenger)))Expected output (locally tested): 3 4. Both models see the same rows and outcome labels.
How it works
Use the same eligible input contract and record both immutable model versions for each paired evaluation. Delayed outcomes must be joined by prediction identity, not by the order in which they arrive. Shadow traffic can reveal numerical regressions, failures and latency changes, but the observed outcomes were generated under the champion policy; they may not describe outcomes under the challenger if decisions change behavior. Do not execute shadow side effects such as writes, notifications or purchases. Account for shared compute and isolate the shadow budget. Compare candidates on a fixed replay cohort with an untouched final canary cohort and predeclared selection criteria. Paired differences often give more informative comparisons than unrelated averages.
Shadow is not a serving action
served=[]; shadow=[]for i in range(3): served.append((i,"champion")); shadow.append((i,"candidate"))print(len(served),len(shadow),sum(v=="candidate" for _,v in served))Expected output (locally tested): 3 3 0. Candidate output is logged separately; none is served.
Common mistakes
Do not count shadow predictions as served decisions. Do not silently drop candidate failures from comparisons or claim a causal benefit from passive replay. Record failures and denominators.
Practice and next steps
Compare two candidates on the same four mature labels. Count disagreements with the champion and separate prediction quality from the side effects that would occur if the candidate served.
Check Your Understanding
Solidify your learning with the interactive assessment directly below this lesson.
Concept Quiz & Questions
Champion challenger and shadow — knowledge check
Apply champion challenger and shadow to small examples and debugging scenarios.
What is the champion?
What is a shadow action?
Why pair replay inputs?
What if a challenger times out?
Can shadow labels prove candidate policy lift?