شعار Mlops And Deployment

Mlops And Deployment

المجتمع
Tibsfox
mlops-and-deployment

MLOps and the production ML lifecycle -- model packaging and serving, CI/CD for ML, experiment tracking, model registries, reproducibility, production monitoring for data and concept drift, retraining pipelines, A/B and shadow deployment, and rollback. Covers batch vs online/real-time inference, REST endpoints, feature stores, data and version pinning, deterministic pipelines, performance-decay detection, and retraining triggers. Use when deploying models to production, serving predictions, monitoring for data or concept drift, setting up ML CI/CD, tracking experiments, managing a model registry, or planning retraining, shadow rollout, and rollback.

نظرة عامة

الناشرTibsfox
المستودعgsd-skill-creator
اسم المهارةmlops-and-deployment
النجوم
70
التفريعات
9
الملفات المرفقة
تعليمات فقط
الروابط
  • تعليمات بصيغة Markdown

    ملف SKILL.md يُحمّله النموذج عند الحاجة، فلا يستهلك توكنات إلا عندما يَرِد طلب ذو صلة فعلًا.

  • تعمل مع أي نموذج لغوي كبير

    مهارات الذكاء الاصطناعي مكتوبة بصيغة Markdown وليست شيفرة خاصة بمزوّد معيّن، لذا تعمل مع GPT أو Claude أو Gemini أو Grok أو نموذج محلي.

  • مكتفية بذاتها

    كل ما يحتاجه النموذج موجود في التعليمات — لا ملفات إضافية لمزامنتها.

  • مفتوحة المصدر

    نشرها Tibsfox على GitHub. اطّلع على المصدر قبل تثبيتها.

التثبيت

ثبّت مهارة الذكاء الاصطناعي Mlops And Deployment في TypingMind لاستخدامها مع أي نموذج لغوي كبير، أو أضفها إلى وكيل ذكاء اصطناعي آخر يقرأ SKILL.md.

1

التثبيت في TypingMind

يُثبّت TypingMind المهارة مباشرةً من مجلدها على GitHub — فيقرأ SKILL.md، ويجمع ملفات الموارد في حزمة، ويحفظ النتيجة محليًا.

  1. افتح التطبيق وانتقل إلى «الإضافات» ثم «المهارات».
  2. اختر «تثبيت من GitHub».
  3. الصق رابط مجلد المهارة الموضّح أدناه وأكّد التثبيت.
    https://github.com/Tibsfox/gsd-skill-creator/tree/main/examples/skills/data-science/mlops-and-deployment
  4. فعّل المهارة في كل محادثة تريد إتاحتها فيها.
الإضافات ← المهارات ← إضافة مهارة ← من رابط GitHub، ثم الصق رابط المجلد واضغط على «متابعة».
2

التثبيت في وكيل ذكاء اصطناعي آخر

يمكن لأي وكيل ذكاء اصطناعي يقرأ تنسيق Agent Skills استخدام هذه المهارة — انسخ المجلد إلى مجلد المهارات الخاص بذلك الوكيل.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/Tibsfox/gsd-skill-creator.git /tmp/gsd-skill-creator
mkdir -p .claude/skills
cp -r /tmp/gsd-skill-creator/examples/skills/data-science/mlops-and-deployment .claude/skills/mlops-and-deployment
أعد تشغيل Claude Code بعد النسخ ليتعرّف على المهارة الجديدة.

استخدمها في TypingMind

فعّل Mlops And Deployment في أي محادثة على TypingMind وسيتولى النموذج الباقي. تتضمن مطالبة النظام اسمها ووصفها، وبمجرد ورود طلب ذي صلة، يُحمّل النموذج التعليمات الكاملة تلقائيًا — فلا تحتاج إلى استدعائها يدويًا، ولا تستهلك أي توكنات حتى تُستخدم فعليًا.

يُحمّل النموذج مهارة Mlops And Deployment تلقائيًا بمجرد ورود طلب ذي صلة بها.

تعمل مع أي نموذج ذكاء اصطناعي

مهارات الذكاء الاصطناعي هي تعليمات بصيغة Markdown وليست شيفرة خاصة بمزوّد معيّن، لذا لا ترتبط Mlops And Deployment بالنموذج الذي كُتبت له. ثبّتها مرة واحدة في TypingMind واستخدمها مع GPT-5 أو Claude أو Gemini أو Grok أو DeepSeek أو Mistral أو Llama أو نموذج محلي تشغّله بنفسك — كل ذلك باستخدام مفاتيح API الخاصة بك.

  • تُحمَّل عند الحاجة فقط

    تتضمن مطالبة النظام الاسم والوصف فقط. وتُجلب التعليمات عند أول طلب ذي صلة، لذا لا تستهلك تعليمات المهارة أي توكنات ما دامت المهارة غير مستخدمة.

  • بدّل النماذج أثناء المحادثة

    لأن المهارة تعليمات وليست شيفرة، فإن تغيير النموذج لا يعطّلها — فالنموذج التالي يقرأ ملف SKILL.md نفسه.

تعليمات المهارة

هذا هو محتوى SKILL.md الذي يُحمّله النموذج. اقرأه قبل التثبيت — فالمهارة عبارة عن تعليمات سيتبعها نموذجك.

MLOps and Deployment

Machine learning foundations end where a trained, validated model sits on disk. MLOps begins there. It is the operational discipline of taking that model into production and keeping it reliable: packaging and serving it, versioning everything that produced it, automating the path from commit to deployment, watching it degrade against a shifting world, and closing the loop with retraining. A model that scores 0.94 on a held-out test set is a scientific result; a model that still scores 0.94 on live traffic six months later is an engineering achievement. This skill covers the second thing.

Agent affinity: breiman (model packaging, serving strategy, evaluation gates), nightingale (pipeline routing, deployment orchestration, monitoring synthesis)

Concept IDs: data-science-drift-detection, data-hypothesis-testing, data-data-quality, data-sampling-methods

The Production ML Lifecycle

Where the ML workflow stops at "deploy," MLOps treats deployment as the midpoint of a loop, not the finish line.

StageGoalKey operations
1. PackageFreeze the trained model into a portable artifactSerialize weights + preprocessing; pin dependencies; containerize
2. RegisterRecord the artifact as a governed, versioned assetModel registry entry with lineage, metrics, stage (staging/prod)
3. ServeExpose predictions to consumersBatch job or online endpoint; feature retrieval; latency/throughput SLOs
4. ReleaseMove new versions into traffic safelyShadow, canary, A/B; gated promotion; rollback plan ready
5. MonitorDetect degradation before users doOperational metrics + data drift + concept drift + performance decay
6. TriggerDecide when the model must changeScheduled, drift-based, or performance-based retraining triggers
7. RetrainProduce the next candidateRe-run the reproducible pipeline on fresh data; re-enter at stage 1

The distinguishing property of ML systems is that the code is not the only thing that changes -- the data changes underneath a static model. This is why MLOps is not "DevOps for models": you version and monitor data and models as first-class artifacts, not just source.

Model Packaging and Serving

The Artifact Boundary

A deployable model is more than its weights. Package the entire inference function:

  • Model weights / parameters (the serialized estimator, e.g. joblib, ONNX, SavedModel, TorchScript).
  • Preprocessing -- the exact fitted transformers (scalers, encoders, vocabularies). A model shipped without its scaler is a silent failure waiting to happen.
  • A signature -- input schema (names, dtypes, shapes) and output schema, so consumers and monitors can validate.
  • Environment -- pinned dependency versions, ideally a container image, so the runtime matches training.

Prefer an interchange format (ONNX, PMML) or a container over pickling a raw Python object: pickled objects are brittle across library versions and are a code-execution risk if the source is untrusted.

Serving Patterns

PatternLatencyHow predictions are producedUse when
Batch (offline)Hours/daysScore a whole dataset on a schedule; write results to a tableRecommendations, churn scores, risk lists -- consumers read precomputed output
Online / real-time (synchronous)msA request hits a REST/gRPC endpoint and blocks for the predictionFraud checks, search ranking, anything in a user request path
Streaming (async)sub-second to secondsScore events off a queue/stream, emit to a downstream topicEvent-driven pipelines, near-real-time enrichment
Edge / embeddedms, offlineModel runs on device (mobile, IoT)No connectivity, privacy, or hard latency constraints

Batch is cheaper and simpler; reach for online serving only when a fresh prediction must exist at request time for an input you could not have precomputed.

Online Endpoints (REST)

An online model is a service. Design it like one:

  • Contract: stable request/response schema; validate inputs against the model signature and reject malformed payloads (a 4xx beats a garbage prediction).
  • Health and readiness: liveness for the process, readiness that confirms the model artifact loaded.
  • Latency budget: the model is one hop; feature lookups, network, and serialization all count. Measure p99, not the mean.
  • Scaling: stateless replicas behind a load balancer; autoscale on throughput. Warm the model at startup so the first request is not a cold-start outlier.
  • Batching: micro-batch concurrent requests for throughput on GPU-bound models, trading a little latency.

Feature Stores

The hardest online-serving bug is training/serving skew: the features computed offline for training differ subtly from those computed online at inference. A feature store solves this by computing each feature once and serving it to both paths.

  • Offline store (columnar warehouse) provides point-in-time-correct features for training -- crucially, the feature as it was known at label time, never leaking the future.
  • Online store (low-latency key-value) serves the same feature definitions at inference in milliseconds.
  • Shared definitions guarantee the same transformation logic feeds training and serving, eliminating skew and enabling feature reuse across models.

Reproducibility

If you cannot rebuild a model bit-for-bit from recorded inputs, you cannot debug it, audit it, or trust its retraining.

Version and Pin Everything

WhatHowWhy
CodeGit commit SHAThe transformation and training logic
DataDataset version / snapshot hash (DVC, lakeFS, immutable partitions)Data is the second half of the model; "latest" is not reproducible
Config / hyperparametersChecked-in config, logged per runThe knobs that produced this artifact
EnvironmentPinned lockfile + container image digestLibrary versions change numeric results
ModelRegistry version + hashThe output, linked back to all of the above

A model artifact should carry lineage: given a version, you can name the exact code SHA, data version, and config that produced it.

Deterministic Pipelines

  • Seed every stochastic step (splits, initialization, shuffling, augmentation) and record the seed.
  • Beware nondeterminism you do not control -- unordered parallel reductions, GPU kernel nondeterminism, dict/set ordering. Pin what you can; document what you cannot.
  • Make the pipeline idempotent: re-running a stage on the same inputs yields the same outputs, so partial failures re-run safely.

Experiment Tracking and Model Registries

Experiment Tracking

During development you will train hundreds of candidates. Track each run's parameters, metrics, code version, data version, and artifacts (MLflow, Weights & Biases, or equivalent) so you can compare runs, reproduce the winner, and answer "why did we ship this one?" months later. An untracked experiment is a result you cannot defend.

Model Registry

The registry is the governed inventory of models that are candidates for or are in production. It provides:

  • Versioning -- immutable, numbered model versions with their metrics and lineage.
  • Stage transitions -- None -> Staging -> Production -> Archived, with an explicit, often gated, promotion step.
  • A single source of truth -- serving infrastructure pulls "the Production version of model X," decoupling deployment from any one training run.
  • Governance -- who promoted what, when, and against which evaluation. This is the audit trail regulators and incident reviews ask for.

CI/CD for ML

Classic CI/CD ships code. ML adds two more moving parts -- data and models -- so the discipline extends to CI/CD/CT (continuous training).

  • Continuous Integration extends beyond unit tests to data validation (schema, ranges, distributions) and model validation (does the retrained candidate beat the current production model on a frozen evaluation set and on fairness/slice metrics?).
  • Continuous Delivery deploys not just a service but a training pipeline; the deliverable is a repeatable pipeline that can produce a model, not only the model.
  • Continuous Training automatically retrains and re-validates when triggered (see Retraining Triggers), producing a new registry candidate.

Gate promotion on evaluation, never on "it trained." A candidate must clear: no regression on the reference test set, acceptable performance on protected slices, and passing data-validation checks. Only then does it become eligible for release. Test the pipeline, not just the model -- most production failures are plumbing (a schema change, a null feature), not modeling.

Monitoring in Production

A deployed model degrades silently: it keeps returning confident predictions while the world drifts away from its training distribution. Monitor three layers.

1. Operational health (it is a service): latency, throughput, error rate, saturation. Necessary but not sufficient -- a model can be perfectly healthy operationally while making increasingly wrong predictions.

2. Data and model quality:

SignalWhat it meansHow to detectLatency to detect
Data drift (covariate shift)P(X) changes -- inputs no longer look like training dataCompare live feature distributions to a training baseline (PSI, KL divergence, KS test, Chi-square)Immediate -- needs only inputs
Concept driftP(y | X) changes -- the input/output relationship itself shiftsTrack prediction quality once labels arrive; monitor prediction distribution as an early proxyDelayed -- needs ground-truth labels
Label / prediction driftP(y-hat) shiftsCompare the output distribution to the training-time label distributionImmediate -- an early warning before labels land
Performance decayAccuracy/AUC/RMSE fall over timeRecompute metrics on labeled production data by time windowAs fast as labels arrive
Data quality breakNulls, new categories, out-of-range, schema changeAssertions/validation at the serving boundaryImmediate

Distinguish drift types because the fix differs: data drift may only need recalibration or retraining on recent data; concept drift means the learned relationship is stale and the model must relearn. Concept drift can be sudden (a policy change), gradual, incremental, or recurring (seasonality) -- and each calls for a different retraining cadence.

3. The label-latency problem: ground truth often arrives late (a loan default surfaces months later) or never. When you cannot measure accuracy in real time, use proxy signals -- input drift, prediction drift, and business KPIs -- as leading indicators, and reserve delayed labels for confirmation.

Retraining Triggers and Pipelines

Retraining is the loop that keeps a model current. Choose a trigger policy:

TriggerMechanismBest for
ScheduledRetrain on a fixed cadence (nightly/weekly)Steady, predictable drift; simplest to operate
Performance-basedRetrain when a monitored metric crosses a thresholdCostly retraining; you retrain only when quality demands it
Drift-basedRetrain when input/prediction drift exceeds a boundFast-moving inputs where labels lag
Data-volume-basedRetrain when N new labeled examples accumulateCold-start growth; label-scarce domains

A retraining pipeline is the same reproducible pipeline used originally, re-run on fresh data: assemble and validate new data, retrain, evaluate the candidate against the current production model on a frozen set, and -- only if it wins and passes checks -- register it and hand it to the release stage. Automate the candidate; keep a human (or a hard gate) on promotion. Guard against feedback loops: when a model's own predictions influence the data it later trains on (a ranker teaches users what to click), naive retraining amplifies its own biases. Log the decisions the model influenced so you can correct for them.

Progressive Deployment and Rollback

Never flip 100% of traffic to a new model version at once. Release progressively so a bad model is contained.

StrategyHow it worksWhat it answers
Shadow (dark launch)New model scores live traffic in parallel; its output is logged, not served"Does it behave sanely on real inputs?" -- zero user risk
CanaryRoute a small % of traffic to the new version, watch metrics, ramp up"Is it safe to widen?"
A/B testSplit traffic between versions and compare a business metric with statistical rigor"Is the new model actually better for users?"
Blue-greenStand up the new version alongside the old, switch over, keep old warmInstant cutover with an instant fallback

Shadow answers correctness, A/B answers value. Shadow deployment catches operational and sanity failures before any user is affected; A/B testing measures whether the offline metric gain translates to a real outcome (offline AUC gains routinely fail to move the business metric).

Rollback is the non-negotiable safety net. Because the previous model is an immutable, registered artifact, rollback is a version pointer change, not a rebuild: repoint the serving layer at the last-known-good Production version. Keep the prior version deployable and warm; define, in advance, the metric thresholds that trigger an automatic rollback. A deployment strategy without a tested rollback path is not a deployment strategy.

Common Mistakes

MistakeWhy it failsFix
Shipping the model without its preprocessingServing computes features differently than trainingPackage the fitted transformers with the model; or use a feature store
Training/serving skewOffline and online feature logic divergeSingle feature definition serving both paths; monitor feature parity
Monitoring only latency/errorsThe model degrades silently while "healthy"Add data-drift, prediction-drift, and performance monitors
Assuming labels arrive quicklyPerformance can't be measured for weeks/monthsUse drift and prediction proxies as leading indicators
"Latest" data, no versioningThe model is irreproducible; you can't audit or debugPin data version + code SHA + config in the model's lineage
Promoting on "it trained"Regressions and fairness violations slip to prodGate promotion on evaluation vs the current production model
Big-bang 100% deployA bad version hits every user at onceShadow, then canary/A-B, with a tested rollback
Ignoring feedback loopsThe model trains on data it shaped, amplifying biasLog influenced decisions; hold out control traffic

Cross-References

  • breiman agent: Model selection and evaluation -- the quality gate a retrained candidate must clear before promotion.
  • nightingale agent: Department routing and synthesis -- orchestrating the deploy/monitor/retrain loop across specialists.
  • machine-learning-foundations skill: The training-side counterpart; produces the validated model this skill takes to production. Its final workflow stage ("deployment") is this skill's entire subject.
  • experimental-design-ds skill: The statistical backbone of A/B tests and shadow evaluations -- randomization, sample size, and causal reading of a rollout.
  • ethics-governance skill: Fairness monitoring, model cards, and the accountability trail that model registries and gated promotion make enforceable.
  • data-wrangling skill: The reproducible transformation chain that feature stores and retraining pipelines depend on.

References

  • Sculley, D., et al. (2015). "Hidden Technical Debt in Machine Learning Systems." Advances in Neural Information Processing Systems (NeurIPS), 28.
  • Breck, E., Cai, S., Nielsen, E., Salib, M., & Sculley, D. (2017). "The ML Test Score: A Rubric for ML Production Readiness and Technical Debt Reduction." IEEE International Conference on Big Data, 1123-1132.
  • Huyen, C. (2022). Designing Machine Learning Systems. O'Reilly Media.
  • Gama, J., Zliobaite, I., Bifet, A., Pechenizkiy, M., & Bouchachia, A. (2014). "A Survey on Concept Drift Adaptation." ACM Computing Surveys, 46(4), 1-37.
  • Paleyes, A., Urma, R.-G., & Lawrence, N. D. (2022). "Challenges in Deploying Machine Learning: A Survey of Case Studies." ACM Computing Surveys, 55(6), 1-29.

الأسئلة الشائعة

ماذا تفعل مهارة الذكاء الاصطناعي Mlops And Deployment؟

MLOps and the production ML lifecycle -- model packaging and serving, CI/CD for ML, experiment tracking, model registries, reproducibility, production monitoring for data and concept drift, retraining pipelines, A/B and shadow deployment, and rollback. Covers batch vs online/real-time inference, REST endpoints, feature stores, data and version pinning, deterministic pipelines, performance-decay detection, and retraining triggers. Use when deploying models to production, serving predictions, monitoring for data or concept drift, setting up ML CI/CD, tracking experiments, managing a model reg...

لماذا تستخدم Mlops And Deployment على TypingMind؟

لأنك تثبّتها مرة واحدة وتستخدمها مع أي نموذج. مهارة Mlops And Deployment عبارة عن نص Markdown وليست شيفرة خاصة بمزود بعينه، لذا تعمل المهارة نفسها مع GPT-5 أو Claude أو Gemini أو Grok أو نموذج محلي، ويمكنك تبديل النموذج أثناء المحادثة دون تعطّل المهارة. يعمل TypingMind بمفاتيح API الخاصة بك، فتدفع للمزودين مباشرةً بدلًا من اشتراك لكل مقعد، وتبقى مهاراتك ومحادثاتك في مساحة التخزين الخاصة بك.

كيف أثبّت Mlops And Deployment في TypingMind؟

في TypingMind، افتح «الإضافات»، ثم «المهارات»، ثم اختر «التثبيت من GitHub» والصق https://github.com/Tibsfox/gsd-skill-creator/tree/main/examples/skills/data-science/mlops-and-deployment. يقرأ TypingMind ملف SKILL.md الخاص بالمهارة ويثبّتها كمهارة يمكنك تفعيلها لكل محادثة على حدة.

ما نماذج الذكاء الاصطناعي التي يمكنها استخدام Mlops And Deployment؟

أي نموذج تربطه في TypingMind. مهارات الذكاء الاصطناعي عبارة عن تعليمات Markdown وليست شيفرة خاصة بمزود بعينه، لذا يمكن لكل من GPT وClaude وGemini وGrok والنماذج المحلية تحميل هذه المهارة عندما يتوافق الطلب معها.

كم نموذج ذكاء اصطناعي يمكنني استخدامه مع Mlops And Deployment؟

أي عدد تريده. ما دام النموذج يدعم المهارات، يمكنك استخدام Mlops And Deployment معه، سواء كان GPT أو Claude أو Gemini أو Grok أو DeepSeek أو Mistral أو Llama أو غيرها، وكل ذلك على TypingMind باستخدام مفاتيح API الخاصة بك.

هل مهارة الذكاء الاصطناعي Mlops And Deployment مجانية؟

نشرها Tibsfox على GitHub. راجع المستودع للاطلاع على شروط الترخيص. لا تدفع إلا لمزود الذكاء الاصطناعي الخاص بك مقابل التوكنات التي تستخدمها.

ما هي مهارات الذكاء الاصطناعي؟

مهارة الذكاء الاصطناعي حزمة تعليمات قابلة لإعادة الاستخدام تعلّم نموذج الذكاء الاصطناعي كيفية تنفيذ مهمة محددة. وتتبع تنسيق Agent Skills المفتوح: ملف SKILL.md يتضمن اسمًا ووصفًا، إلى جانب أي نصوص برمجية أو قوالب أو ملفات مرجعية قد يحتاج إليها النموذج. لا يقرأ النموذج التعليمات إلا عندما يتوافق طلبك مع المهارة، لذا لا تترتب على المهارة المثبتة أي تكلفة حتى تُستخدم.

كيف تختلف مهارات الذكاء الاصطناعي عن الإضافات أو موصلات MCP؟

تمنح الإضافة أو موصل MCP النموذج أدوات جديدة يمكنه استدعاؤها، وهي شيفرة تُنفَّذ في مكان ما وتُرجع نتيجة. أما مهارة الذكاء الاصطناعي فتزوّد النموذج بالمعرفة ومنهجية العمل: كيفية التعامل مع مهمة، والخطوات التي ينبغي اتباعها، وما ينبغي أن تكون عليه المخرجات الجيدة. المهارات عبارة عن نصوص Markdown، لذا لا تحتاج إلى خادم أو مفتاح API أو بيئة تشغيل، وتعمل مع أي نموذج.

عرض الكل

أنشئ مساحة عملك للذكاء الاصطناعي الآن

اشترك في نشرتنا الإخبارية لتصلك أخبار الميزات الجديدة والهدايا القادمة 👇