Design Experiment Tracking

Medium40 min
1 / 30
understanding8 min read

Problem Statement: ML Experiment Tracking

Problem Statement: ML Experiment Tracking — experiment tracking interview depth

Problem Statement: ML Experiment Tracking

Design an enterprise ML experiment tracking platform that logs runs, hyperparameters, time-series metrics, and artifacts with reproducible lineage. This section uses a mechanism-first lens on runs as first-class records with params, metrics, tags, and artifact URIs.

Why Weights & Biases, MLflow, and Neptune interviews probe here

Vendors need engineers who separate metadata OLTP from metric flood ingestion and who can defend compare-query latency without scanning raw time series. Hand-waving "we log to S3" fails when asked about idempotent batching, per-tenant noisy neighbors, or chart freshness under 18K writes/sec.

Operational detail you should voice aloud

State numeric assumptions: 85K runs/day, 4.2B metric points/day, 18K peak metric QPS, P99 log_metric 120 ms, and 190 TB/day artifact ingress. Tie each figure to a formula on the whiteboard.

Failure modes worth volunteering

Duplicate metric steps from retried SDK batches, chart staleness when rollup workers lag, artifact uploads without manifest closure, and compare queries that fan out to cold storage. For each, name detection (dedupe key collision metric, consumer lag alert) and mitigation (idempotency table, autoscaled rollup pods, upload completion webhook).

Whiteboard checkpoint

Draw API + Kafka + columnar metrics on the left, Postgres metadata + OpenSearch facets on the right, object store underneath. Label where idempotency keys land and where rollups feed the compare UI.

Implementation snippets (experiment tracking)

javaOne Dark Pro
1public record RunKey(String workspaceId, String runId) {}
2public enum RunStatus { RUNNING, FINISHED, FAILED, KILLED }
pythonOne Dark Pro
1@dataclass(frozen=True)
2class RunKey:
3 workspace_id: str
4 run_id: str
5
6class RunStatus(str, Enum):
7 RUNNING = "running"
8 FINISHED = "finished"
9 FAILED = "failed"
10 KILLED = "killed"
typescriptOne Dark Pro
1export interface RunKey {
2 workspaceId: string;
3 runId: string;
4}
5export type RunStatus = "running" | "finished" | "failed" | "killed";

Section-specific depth (sec-01)

Anchor this slice to Problem Statement: ML Experiment Tracking: explain how workspace → project → experiment → run hierarchy changes chart lag SLIs, how time-series metrics separate from oltp metadata affects retention cost, and how reproducibility bundle: git sha, docker image, seed, data snapshot uri shapes SDK retry contracts—not generic MLOps platitudes.

Why interviewers care

Experiment Tracking interviews reward crisp scope, explicit trade-offs, and failure stories—not generic microservice diagrams.

Interview checkpoint

Name one failure story for Problem Statement: ML Experiment Tracking that proves you understand real outages, not happy-path diagrams.

Key Highlights

  • Workspace → Project → Experiment → Run hierarchy
  • Time-series metrics separate from OLTP metadata
  • Reproducibility bundle: git SHA, docker image, seed, data snapshot URI
  • Compare runs UI is read-heavy aggregation, not raw log replay
Interview tip
Lead with Workspace → Project → Experiment → Run hierarchy before drawing boxes—interviewers score ingestion math first.
Avoid
Do not store billions of metric points in Postgres JSONB; pair OLTP metadata with a columnar metrics store and rollups for charts.

Section Rescue Kit

Buzzwords to use:

Idempotent Metric BatchMetric Rollup

Safe statements:

  • "Let me split metadata (Problem Statement: ML Experiment Tracking) from metric flood and cite 18K QPS before picking Kafka partitions."
  • "I will mention idempotency keys and workspace shard keys when discussing tenant isolation."
Design Experiment Tracking - System Design | WinJob | WinJob