Skip to content
C.W.K.
Stream
Lesson 08 of 10 · published

The Hidden Cost of ML

~28 min · mlops, lifecycle

Level 0Scout
0 XP0/48 lessons0/11 achievements
0/120 XP to next level120 XP to go0% complete

Training is the easy part

The first model takes a week. The next year takes the rest of the team. Most ML costs live outside training: labeling pipelines, feature pipelines, drift monitoring, retraining cadence, rollback procedures, on-call, alerting, and the documentation that lets a new engineer ship a fix without paging the original author.

The lifecycle bill

  • Data — collection, cleaning, labeling, ongoing quality checks.
  • Features — pipeline code, freshness SLAs, backfill stories.
  • Training — compute, experimentation, hyperparameter search.
  • Serving — latency, autoscaling, A/B framework, fallback path.
  • Monitoring — input drift, output drift, calibration, business KPIs.
  • Governance — model cards, audits, approvals, deprecation plan.

Hidden coupling multiplies the bill

A changed column can touch ingestion, feature code, training, serving, dashboards, and alert thresholds. If those dependencies are not explicit, a small upstream change becomes silent degradation. Delayed labels make this worse because the system can be wrong for weeks before performance metrics arrive.

The honest plan

Estimate each line item before you commit to ML. Name who owns data quality, when retraining happens, and the exact condition that rolls back to a previous artifact. If the team cannot staff monitoring, the model will silently degrade. If there is no rollback path, the first bad day becomes the last good week.

Plan the end too

Deprecation includes removing callers, deleting retained features and predictions on schedule, and returning dependent workflows to a safe fallback. A model without an owner and retirement condition becomes a ghost service that still carries cost and risk.

Code

A minimal lifecycle budget·python
lifecycle_budget = {
    "data_labeling_hrs_per_month": 40,
    "feature_pipeline_oncall": "shared rotation",
    "training_compute_usd_per_month": 250,
    "serving_latency_p99_ms": 150,
    "retraining_cadence": "weekly",
    "rollback_target_minutes": 10,
    "monitoring_dashboards": ["input_drift", "output_drift", "business_kpi"],
}
A rollback hatch is part of the model·python
def serve(features, primary, fallback, allow_primary):
    if allow_primary():
        try:
            return primary.predict(features)
        except Exception as exc:
            log("primary failed, falling back", exc=exc)
    return fallback.predict(features)

External links

Exercise

Sketch the lifecycle budget for an ML idea your team is considering. Include labeling hours per month, retraining cadence, rollback time target, and which dashboards must exist before launch. Compare to your team's actual capacity.

Progress

Progress is local-only — sign in to sync across devices.
Spotted a bug or have feedback on this page?Report an Issue

Comments 0

🔔 Reply notifications (sign in)
Sign inPlease sign in to comment.

No comments yet — be the first.