Defina criterios de reversión automática
Revierta cuando los errores o la latencia superen un límite de seguridad.
Defina criterios de reversión automática es una lección gratuita de MLOps Academy en CoddyKit. Esta es la lección 3 de 4. Puedes leer la lección completa abajo gratuitamente — luego la practicas en el navegador con un editor de código integrado y un tutor de IA 24/7. Forma parte de la ruta de aprendizaje de MLOps Academy, y tu progreso se sincroniza en la web y la app de CoddyKit. El curso de MLOps Academy incluye 4 lecciones en total.
Partes de esta lección aún no han sido traducidas y se muestran en inglés.
Why Automate Rollback
At 3 a.m. nobody is watching dashboards. Automatic rollback lets the system itself revert a bad model the moment it crosses a danger line. 🚨
Pick Clear Guardrails
A rollback rule needs a measurable guardrail metric, like error rate or p99 latency, with a number that clearly means trouble.
Set a Hard Threshold
Turn vague worry into a concrete limit. For example, roll back if the canary error rate exceeds 2% over the measurement window.
ROLLBACK_RULES = {
"error_rate": 0.02,
"p99_latency_ms": 500,
}Compare to the Champion
Absolute limits miss slow regressions. Also roll back if the canary is clearly worse than the champion, say 20% higher latency on the same traffic.
Choose a Time Window
Judge metrics over a rolling window, like the last 5 minutes. One unlucky request should never trigger a full rollback by itself.
Wait for Enough Traffic
A 100% error rate over three requests means nothing. Require a minimum sample size before any metric is allowed to fire a rollback.
The Decision in Code
The check is just a comparison: if the live metric breaches its limit, return a rollback signal for the orchestrator to act on.
def should_rollback(metrics):
return (
metrics["error_rate"] > 0.02
or metrics["p99_latency_ms"] > 500
)Watch Business Metrics Too
A model can be fast and error-free yet still tank conversions. Guard the outcomes that matter, not only the technical health signals.
Make Rollback Cheap
Rollback should be one fast, safe step: flip traffic back to the proven champion. Keep that previous version warm and ready to take over.
Always Alert a Human
Automation handles the emergency stop, but it must notify the team too. An auto-rollback should page someone to investigate the root cause.
Avoid Flapping
Do not auto-redeploy the same failing model right after rollback. Freeze the rollout until a human reviews, so it cannot flap back and forth.
Quick Check
Which design choice keeps rollback rules trustworthy?
Recap
Good rollback criteria use clear thresholds over a fair window with enough traffic, compare to the champion, alert a human, and revert fast. ✅
Preguntas frecuentes
¿La lección «Defina criterios de reversión automática» es gratis?
Sí — el texto completo de «Defina criterios de reversión automática» es gratis para leer aquí en la web. Para practicarla de forma interactiva (editor de código integrado y tutor de IA 24/7) y desbloquear el resto del curso de MLOps Academy, actualiza a CoddyKit PRO. El curso de MLOps Academy incluye 4 lecciones en total.
¿Qué aprenderé en «Defina criterios de reversión automática»?
Revierta cuando los errores o la latencia superen un límite de seguridad. Practicas MLOps Academy con código real que ejecutas directamente en el navegador, y un tutor de IA 24/7 responde tus preguntas mientras trabajas en la lección.
¿Necesito experiencia previa para empezar MLOps Academy?
No se requiere experiencia previa. MLOps Academy en CoddyKit está estructurado para principiantes hasta estudiantes avanzados, así que puedes empezar aquí o desde el inicio y avanzar a tu ritmo. Esta es la lección 3 de 4.
¿Cuánto tiempo toma la lección «Defina criterios de reversión automática»?
La mayoría de las lecciones de CoddyKit toman alrededor de 5–10 minutos. Cada una es compacta e interactiva, así que avanzas constantemente y retomas exactamente por donde dejaste en la web y la app.
¿Puedo escribir y ejecutar código en esta lección de MLOps Academy?
Sí. Cada lección de MLOps Academy incluye un editor de código integrado, así que escribes y ejecutas código real directamente en tu navegador y obtienes retroalimentación instantánea de IA — sin configuración local necesaria.
Todas las lecciones de este curso
- Despliegues canary: publique primero para unos pocos
- Replique el tráfico sin afectar a los usuarios
- Defina criterios de reversión automática
- Entrega progresiva con Argo Rollouts