تعيين بوابات الجودة والعتبات
أفشل البناء إذا انخفض عن مقياس أدنى.
تعيين بوابات الجودة والعتبات درس مجاني في MLOps Academy على CoddyKit. هذا هو الدرس 3 من أصل 4. يمكنك قراءة الدرس كاملاً أدناه مجاناً — ثم تمرن عليه مباشرة في المتصفح باستخدام محرر أكواد مدمج ومدرس ذكاء اصطناعي متاح 24/7. هذا الدرس جزء من مسار التعلم في MLOps Academy، وتقدمك يتزامن عبر الويب وتطبيق CoddyKit. تتضمن دورة MLOps Academy 4 دروس في المجموع.
بعض أجزاء هذا الدرس لم تُترجم بعد وتظهر باللغة الإنجليزية.
A Gate Decides Pass or Fail
A quality gate is an automatic rule that stops a bad model from shipping. If the new model misses the bar, the build simply fails.
Pick a Primary Metric
Choose one metric that matters most for the task, like F1 or AUC. Your primary metric drives the gate so the decision stays clear.
Set an Absolute Threshold
The simplest gate is a hard floor. An absolute threshold blocks any model whose score falls below a fixed minimum value.
assert f1 >= 0.85, "F1 below the gate"Compare Against a Baseline
Beating a dumb model proves real value. A baseline gate fails the build if you cannot beat predicting the majority class.
Block Regressions
New should not be worse than current. A regression gate compares the candidate to the live model and rejects any drop.
assert new_auc >= prod_auc - 0.01Allow a Small Tolerance
Scores wobble run to run from randomness. A small tolerance avoids flaky failures while still catching real regressions.
Gate on Slices Too
Overall numbers can hide weak groups. A slice gate requires the worst segment to clear its own minimum, not just the average.
Gate Beyond Accuracy
Latency and model size matter in production. Add gates on non-accuracy limits so a slow or huge model also fails the build.
Fail the Build Loudly
A failing assertion returns a non-zero exit code. CI reads that exit code and stops the deploy, so no one ships by accident.
Store the Numbers
Log every gate result to MLflow or a file. A recorded history lets you see how thresholds and scores trend over time.
Tune Gates Over Time
Set the bar where it blocks bad models but not good ones. Revisit each threshold as the model and the business mature.
Quick Check
Why add a small tolerance to a regression gate instead of requiring exact parity?
Recap: Gates Stop Bad Models
You now set quality gates: absolute floors, baseline and regression checks, slice and latency limits that fail the build before a weak model ships. ✅
الأسئلة الشائعة
هل درس «تعيين بوابات الجودة والعتبات» مجاني؟
نعم — نص درس «تعيين بوابات الجودة والعتبات» كامل متاح مجاناً هنا على الويب. لتمرينه بشكل تفاعلي (محرر أكواد مدمج ومدرس ذكاء اصطناعي متاح 24/7) وفتح باقي دورة MLOps Academy، انتقل إلى CoddyKit PRO. تتضمن دورة MLOps Academy 4 دروس في المجموع.
ماذا ستتعلم في «تعيين بوابات الجودة والعتبات»؟
أفشل البناء إذا انخفض عن مقياس أدنى. تتمرن على MLOps Academy مع أكواد عملية تشغلها مباشرة في المتصفح، ومدرس ذكاء اصطناعي متاح 24/7 يجيب على أسئلتك أثناء عملك.
هل أحتاج إلى خبرة سابقة لأبدأ MLOps Academy؟
لا تُشترط خبرة سابقة. MLOps Academy على CoddyKit منظم للمبتدئين حتى المتقدمين، لذا يمكنك البدء من هنا أو من البداية والتقدم بسرعتك الخاصة. هذا هو الدرس 3 من أصل 4.
كم من الوقت يستغرق درس «تعيين بوابات الجودة والعتبات»؟
معظم دروس CoddyKit تستغرق حوالي 5–10 دقائق. كل منها موجز وتفاعلي، لذا تحرز تقدماً مستمراً وتستأنف من حيث توقفت عبر الويب والتطبيق.
هل يمكنني كتابة وتشغيل أكواد في درس MLOps Academy هذا؟
نعم. كل درس في MLOps Academy يتضمن محرر أكواد مدمج، لذا تكتب وتشغل أكواداً حقيقية مباشرة في متصفحك وتحصل على تعليقات فورية من الذكاء الاصطناعي — بدون إعداد محلي.
جميع الدروس في هذه الدورة
- اختبار مسار البيانات اختباراً وحدياً
- اختبارات سلوكية للنماذج
- تعيين بوابات الجودة والعتبات
- التحقق من البيانات باستخدام Great Expectations