Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Месяц 6 — Сборник упражнений

🟢 Easy

MLflow

  1. SQLite + MLflow + 5 run.
  2. Использование mlflow.sklearn.autolog().
  3. Model Registry: register → Staging → Production.

DVC

  1. dvc init + versioning одного CSV.
  2. Local DVC remote.
  3. 2 версии данных, откат к старой.

FastAPI Serving

  1. Вывод sklearn модели в FastAPI.
  2. Health checks.
  3. Prometheus metrics.

Docker / K8s

  1. Multi-stage Dockerfile.
  2. Docker Compose: API + Postgres.
  3. minikube setup.

Monitoring

  1. Первый Evidently AI report.
  2. PSI calculation.
  3. Custom Prometheus gauge.

CI/CD

  1. GitHub Actions pytest pipeline.
  2. Code quality checks.
  3. Docker build action.

Airflow

  1. Local Airflow Docker.
  2. Первый DAG (hello world).
  3. Daily scheduled task.

🟡 Medium

Integrations

  1. MLflow + DVC: оба вместе в проекте.
  2. FastAPI + MLflow Registry: загрузка модели из production.
  3. Docker Compose: API + MLflow + Postgres + MinIO.
  4. K8s + HPA: auto-scaling через load test.
  5. Airflow + MLflow: scheduled retraining DAG.

Real workflows

  1. Full retraining pipeline: DVC repro + MLflow log + K8s update.
  2. Daily inference batch: Airflow DAG, 100K users.
  3. Monitoring dashboard: Grafana + Prometheus + Evidently.
  4. A/B test: Istio или nginx canary deployment.
  5. CML report: автоматическое metrics comparison в PR.

🔴 Hard (Production)

1. End-to-End MLOps Platform

Требования:

  • Классическая ML модель (regression или classification)
  • DVC for data versioning (S3 или MinIO)
  • MLflow for experiment tracking + Registry
  • DVC + MLflow integration
  • FastAPI serving + ONNX optimization
  • Docker + K8s deployment (manifest или Helm)
  • Prometheus + Grafana monitoring
  • Evidently AI drift detection
  • GitHub Actions CI/CD
  • Airflow scheduled retraining
  • Slack notifications

Deliverables:

  • GitHub repo (public)
  • README + architecture diagram
  • Demo video (Loom)
  • LinkedIn post

2. Multi-model Platform

Требования:

  • 3+ разных модели (classification, regression, NLP)
  • Universal serving API (model-as-a-service)
  • Per-model routing и versioning
  • Centralized monitoring
  • Cost tracking per model/user
  • API rate limiting

3. Real-time Streaming ML

Требования:

  • Kafka stream (или Redis Streams)
  • Real-time feature engineering
  • Low-latency inference (<50ms p95)
  • Online learning (River library)
  • Real-time monitoring dashboard

4. ML Platform as a Service (MLaaS)

Требования:

  • User uploads CSV → auto-ML training
  • BentoML packaging
  • Auto-deployment в K8s
  • Per-user namespaces
  • Billing integration
  • Admin dashboard

Мини-проекты

Мини-проект 1: Personal Health ML Platform

  • Fitbit/Apple Health data
  • Predict health metrics
  • Daily inference + insights
  • Telegram bot

Мини-проект 2: E-commerce Recommendation MLOps

  • Online learning (recommendations)
  • Feature store (Feast)
  • A/B test framework
  • Real-time deployment

Мини-проект 3: Fraud Detection System

  • Streaming fraud detection
  • Real-time monitoring
  • Alert system
  • Explainability dashboard

Мини-проект 4: Computer Vision SaaS

  • Multi-tenant CV API
  • Image moderation, OCR, classification
  • Usage tracking + billing
  • Streamlit demo

Quiz

MLOps Fundamentals

  1. Разница MLOps и DevOps?
  2. 8 этапов ML Lifecycle?
  3. MLOps Maturity Levels (0, 1, 2)?
  4. 3 основных требования Reproducibility?
  5. Why ML monitoring is harder than software monitoring?

MLflow

  1. Разница Tracking, Models, Registry, Projects?
  2. Как работает Auto-logging?
  3. Workflow stages в Model Registry?
  4. Как rollout новой модели в production?
  5. MLflow vs W&B vs Neptune?

DVC

  1. Почему Git не подходит для ML data?
  2. Функция dvc.yaml и dvc.lock?
  3. Варианты Remote storage?
  4. Какие stages перезапускает dvc repro?
  5. DVC vs LakeFS vs Pachyderm?

Serving

  1. FastAPI custom vs BentoML vs TorchServe — когда какой?
  2. Почему Batching важен на GPU?
  3. Почему полезен ONNX?
  4. Паттерны Async inference?
  5. Blue-green vs canary vs shadow deployment?

Docker / K8s

  1. Зачем Multi-stage build?
  2. K8s Pod, Deployment, Service?
  3. Probes (liveness, readiness)?
  4. По каким metrics работает HPA?
  5. Что такое KServe?

Monitoring

  1. Data drift, concept drift, prediction drift?
  2. PSI vs KS test?
  3. Evidently AI vs WhyLabs?
  4. Prometheus Counter vs Histogram vs Gauge?
  5. Retraining trigger logic?

CI/CD

  1. Что добавляется в ML CI/CD (по сравнению с классическим DevOps)?
  2. Code, data, model testing?
  3. Что делает CML?
  4. Deployment strategies?
  5. Rollback mechanism?

Airflow

  1. Разница DAG и Task?
  2. Зачем XCom?
  3. Sensors?
  4. TaskFlow API vs traditional Operators?
  5. Airflow vs Prefect vs Dagster?

✅ Чек-лист конца Месяца 6 (самый важный месяц!)

  • MLflow Tracking + Registry
  • DVC data versioning
  • FastAPI ML serving (production-ready)
  • Docker Compose stack
  • Local Kubernetes deployment
  • Prometheus + Grafana monitoring
  • Evidently AI drift detection
  • GitHub Actions ML pipeline
  • CML reports
  • Airflow DAG for retraining
  • End-to-end MLOps проект на GitHub
  • Architecture diagram
  • LinkedIn post (сертификат + GitHub link)
  • Обновить CV: “ML Engineer / MLOps Engineer”
  • Отправить заявки на 5+ вакансий

6 месяцев завершены!

Теперь вы полноценный ML Engineer / MLOps Engineer. Следующий шаг:

  1. Финальные проекты — 4 больших проекта для portfolio
  2. Job applications — заявки на вакансии
  3. Open source contributions — в MLflow, Evidently, DVC и т.д.
  4. Speaking — выступать про ML/MLOps на meetup
  5. Mentor — обучать других

Всё в ваших руках. Удачи!