lesson 4 of 5 · model registry shapelesson 4 of 5 · model registry shapelesson 4 of 5 · model registry shapelesson 4 of 5 · model registry shapelesson 4 of 5 · model registry shapelesson 4 of 5 · model registry shapelesson 4 of 5 · model registry shapelesson 4 of 5 · model registry shapelesson 4 of 5 · model registry shapelesson 4 of 5 · model registry shapelesson 4 of 5 · model registry shape
Checkpoint
One last thing before we move on. pass this to mark the lesson done, or skip and keep moving. hop to the next when you're ready.
Promotion is a gate, not a mood: write promote_gated(name, version, candidate_acc). If a production incumbent exists and the candidate's accuracy is LOWER, print f"REFUSED: candidate acc {c} < incumbent {i}" and return False, leaving the registry untouched. Otherwise archive the incumbent, register the candidate as production, print f"promoted {name} v{version} (acc {a})", return True. Try a worse candidate (v4 @ 0.82 — refused) then a better one (v5 @ 0.89 — promoted), then print every entry as f"{n} v{v}: {stage} acc={acc}" (sorted).