Logo Mlops And Deployment

Mlops And Deployment

Cộng đồng
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.

Tổng quan

Nhà phát hànhTibsfox
Kho mãgsd-skill-creator
Tên kỹ năngmlops-and-deployment
Sao
70
Bản fork
9
Tệp đi kèm
Chỉ có hướng dẫn
Liên kết
  • Hướng dẫn bằng Markdown

    Tệp SKILL.md được mô hình tải khi cần, nên chỉ tốn token khi có yêu cầu thực sự phù hợp.

  • Dùng được với mọi LLM

    Kỹ năng AI dùng hướng dẫn viết bằng Markdown thay vì mã dành riêng cho một nhà cung cấp, nên dùng được với GPT, Claude, Gemini, Grok hoặc mô hình cục bộ.

  • Hướng dẫn có đủ mọi thứ cần thiết

    Mọi thứ mô hình cần đều nằm trong hướng dẫn — không có tệp bổ sung cần đồng bộ.

  • Mã nguồn mở

    Được Tibsfox công bố trên GitHub. Hãy đọc các tệp nguồn trước khi cài đặt.

Cài đặt

Cài đặt kỹ năng AI Mlops And Deployment trong TypingMind để dùng với bất kỳ LLM nào, hoặc thêm vào một tác nhân AI khác có thể đọc SKILL.md.

1

Cài đặt trong TypingMind

TypingMind cài đặt kỹ năng trực tiếp từ thư mục GitHub — đọc SKILL.md, đóng gói các tệp tài nguyên và lưu kết quả trên máy.

  1. Mở ứng dụng và vào Plugin → Kỹ năng.
  2. Chọn "Cài đặt từ GitHub".
  3. Dán URL của thư mục kỹ năng được hiển thị bên dưới rồi xác nhận.
    https://github.com/Tibsfox/gsd-skill-creator/tree/main/examples/skills/data-science/mlops-and-deployment
  4. Bật kỹ năng trong từng cuộc trò chuyện mà bạn muốn sử dụng kỹ năng đó.
Plugin → Kỹ năng → Thêm kỹ năng → Từ URL GitHub, sau đó dán URL thư mục và nhấn Tiếp tục.
2

Cài đặt trong tác nhân AI khác

Bất kỳ tác nhân AI nào đọc được định dạng Agent Skills đều có thể dùng kỹ năng này — hãy sao chép thư mục vào thư mục kỹ năng của tác nhân AI đó.

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
Khởi động lại Claude Code sau khi sao chép để ứng dụng nhận kỹ năng mới.

Sử dụng trong TypingMind

Bật Mlops And Deployment trong bất kỳ cuộc trò chuyện nào trên TypingMind, mô hình sẽ tự xử lý phần còn lại. Tên và mô tả của kỹ năng nằm trong prompt hệ thống. Ngay khi có yêu cầu phù hợp, mô hình tự tải toàn bộ hướng dẫn — bạn không cần gọi thủ công và kỹ năng không tốn token cho đến khi thực sự được dùng.

Mô hình tự nạp Mlops And Deployment ngay khi có yêu cầu phù hợp.

Dùng được với mọi mô hình AI

Kỹ năng AI là các hướng dẫn Markdown thuần túy, không phải mã dành riêng cho một nhà cung cấp, nên bạn có thể dùng Mlops And Deployment với cả những mô hình khác ngoài mô hình ban đầu. Chỉ cần cài đặt một lần trong TypingMind rồi dùng với GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama hoặc mô hình cục bộ do bạn tự chạy — tất cả đều dùng khóa API của riêng bạn.

  • Chỉ tải khi cần

    Prompt hệ thống chỉ chứa tên và mô tả. Hướng dẫn được tải khi có yêu cầu phù hợp đầu tiên, nên khi kỹ năng chưa được dùng, bạn không tốn token cho phần hướng dẫn.

  • Đổi mô hình ngay trong cuộc trò chuyện

    Vì kỹ năng là hướng dẫn chứ không phải mã, việc đổi mô hình không làm kỹ năng ngừng hoạt động — mô hình tiếp theo vẫn đọc cùng tệp SKILL.md.

Hướng dẫn của kỹ năng

Đây là nội dung SKILL.md mà mô hình tải. Hãy đọc trước khi cài đặt — kỹ năng là những hướng dẫn mà mô hình của bạn sẽ làm theo.

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.

Câu hỏi thường gặp

Kỹ năng AI Mlops And Deployment làm được gì?

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...

Vì sao nên dùng Mlops And Deployment trên TypingMind?

Vì bạn chỉ cần cài một lần rồi dùng với bất kỳ mô hình nào. Mlops And Deployment là nội dung Markdown chứ không phải mã dành riêng cho từng nhà cung cấp, nên cùng một kỹ năng có thể chạy trên GPT-5, Claude, Gemini, Grok hoặc mô hình trên thiết bị — và bạn có thể đổi mô hình ngay trong cuộc trò chuyện mà kỹ năng vẫn hoạt động. TypingMind dùng khóa API riêng của bạn, nên bạn thanh toán trực tiếp cho nhà cung cấp thay vì trả phí thuê bao theo suất người dùng, đồng thời kỹ năng và các cuộc trò chuyện vẫn nằm trong bộ lưu trữ của bạn.

Làm thế nào để cài Mlops And Deployment trong TypingMind?

Mở Plugin → Kỹ năng → Cài đặt từ GitHub trong TypingMind rồi dán https://github.com/Tibsfox/gsd-skill-creator/tree/main/examples/skills/data-science/mlops-and-deployment. TypingMind đọc tệp SKILL.md rồi cài đặt kỹ năng để bạn có thể bật cho từng cuộc trò chuyện.

Những mô hình AI nào có thể dùng Mlops And Deployment?

Bất kỳ mô hình nào bạn kết nối trong TypingMind. Kỹ năng AI là các hướng dẫn bằng Markdown chứ không phải mã dành riêng cho từng nhà cung cấp, nên GPT, Claude, Gemini, Grok và các mô hình chạy trên thiết bị đều có thể tải kỹ năng này khi có yêu cầu phù hợp.

Có thể dùng Mlops And Deployment với bao nhiêu mô hình AI?

Bao nhiêu cũng được. Miễn là mô hình hỗ trợ kỹ năng, bạn có thể dùng Mlops And Deployment với mô hình đó — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama và nhiều mô hình khác — tất cả đều trên TypingMind với khóa API riêng của bạn.

Kỹ năng AI Mlops And Deployment có miễn phí không?

Kỹ năng này được Tibsfox phát hành trên GitHub. Hãy xem điều khoản giấy phép trong kho mã. Bạn chỉ trả tiền cho nhà cung cấp AI của mình theo số token đã dùng.

Kỹ năng AI là gì?

Kỹ năng AI là một gói hướng dẫn có thể tái sử dụng, chỉ cho mô hình AI cách thực hiện một tác vụ cụ thể. Kỹ năng tuân theo định dạng mở Agent Skills: một tệp SKILL.md chứa tên và mô tả, cùng các tập lệnh, mẫu hoặc tệp tham khảo mà mô hình có thể cần. Mô hình chỉ đọc hướng dẫn khi yêu cầu của bạn phù hợp với kỹ năng, nên kỹ năng đã cài đặt không phát sinh chi phí cho đến khi được sử dụng.

Kỹ năng AI khác gì với plugin hoặc máy chủ MCP?

Plugin hoặc máy chủ MCP cung cấp các công cụ mới mà mô hình có thể gọi. Khi mô hình gọi một công cụ, mã của công cụ đó chạy ở đâu đó và trả về kết quả. Còn kỹ năng AI cung cấp kiến thức và quy trình: cách tiếp cận tác vụ, các bước cần thực hiện và những tiêu chí mà kết quả cần đáp ứng. Kỹ năng chỉ là nội dung Markdown, nên không cần máy chủ, khóa API hay môi trường thực thi và hoạt động với mọi mô hình.

Xem tất cả

Tạo ngay không gian làm việc AI riêng

Đăng ký bản tin của chúng tôi để nhận thông báo về tính năng mới và các đợt tặng quà sắp tới 👇