Evolution of ML Model Deployment Infrastructure at Scale

faire · E-commerce · 2023 · source Agentic: no · promotional bias: low · source-backed · extracted with prompt 0.5.6 (schema v2)

Generated from extraction.json — do not edit by hand. Every claim cites verbatim source evidence; stated means the quote directly asserts the claim, implied means it supports it indirectly.

Problem

Domain: ML model deployment platform

Faire needed to move from monolith-based, PR-heavy ML deployments to a safer self-serve model deployment system that handled model versions, workloads, testing, observability, rollouts, and cleanup at scale.

Constraints:

Architecture

Faire built MMM, an internal UI and management layer over Comet, S3, SageMaker, GitHub, backend monolith integration, golden-data testing, metrics, monitors, gradual/expedited rollouts, and shadow tests. Data scientists register models and endpoint settings in one flow while MMM generates code, opens PRs, validates configuration, auto-merges after tests, updates Comet, deploys SageMaker endpoints, and tracks deployment state.

Diagram confidence: reconstructed (reconstructed from prose).

flowchart LR
  comet-registry["Comet registry"] --> mmm-ui["MMM UI"]
  feature-store["Feature store"] --> mmm-ui
  mmm-ui --> github-code-generator["GitHub code generator"]
  github-code-generator --> validation-pipeline["Validation pipeline"]
  validation-pipeline --> sagemaker-deployment["SageMaker deployment"]
  sagemaker-deployment --> observability-layer["Observability layer"]
  observability-layer --> mmm-ui
Drag to pan · scroll or use +/− to zoom · reconstructed from the source's described component topology

Components

Component Role Interacts with
Comet registry Tracks model metadata, experiments, deployments, and versions. MMM UI
Feature store Holds features used by deployed models. MMM UI
MMM UI Collects model, container, endpoint, scaling, timeout, and rollout settings from data scientists. GitHub code generator
GitHub code generator Generates deployment code and PRs for production integration. Validation pipeline
Validation pipeline Runs tests, golden-data checks, and configuration validation before deployment. SageMaker deployment
SageMaker deployment Hosts real-time inference endpoints with rollout and shadow variants. Observability layer
Observability layer Adds metrics, monitors, deployment state, endpoint status, and usage tracking. MMM UI

Data flow

A data scientist registers a model in Comet and features in the feature store, enters model and endpoint configuration in MMM, MMM creates deployable artifacts and GitHub changes, runs golden-data tests and validation, auto-merges when checks pass, updates Comet and production S3 buckets, deploys to SageMaker, and tracks rollout, shadow, abort, retire, metrics, and monitors.

“they just come to the mmm UI and they tell it a bit about the model”transcript, stated
“mmm goes and does a bunch of code gen gets things ready in GitHub”transcript, stated

Why this architecture

Faire kept SageMaker and Comet as battle-tested platform pieces but hid their operational complexity behind MMM because the flexible infrastructure had become too hard for data scientists to operate directly. The UI concentrated model configuration, validation, rollout, and observability in one self-serve flow.

“there was so many layers that people had to deal with just to get their models in”transcript, stated
“made it just a singular UI flow so that users don't need to know all that complexity”transcript, stated

Models used: Amazon SageMaker · Comet · Feature store · S3 · GitHub PRs · Golden-data tests · Shadow rollouts

Scale

Alternatives considered (roads not taken)

Embed models directly in the backend monolith.

Rejected because: One bottleneck could not handle diverse traffic, libraries, architectures, GPU needs, deploy speed, and versioning.

“all of that still has to end up going through One Singular bottleneck”transcript, stated

Expose SageMaker and Comet directly through YAML and PRs.

Rejected because: The system became a five-plus-step deployment flow with three to four PRs for data scientists.

“this becomes a five plus step process with three to four PRS in the flow and that just becomes unmanageable”transcript, stated

Require human review after tests pass.

Rejected because: For the supported deployment flow, tests are strong enough that the PR can auto-merge after validation.

“once all those tests pass we just Auto merge the pr in that there is no human required in that flow”transcript, stated

Patterns

canary-rollout (model deployment)

MMM supports gradual, expedited, and shadow rollouts before final production deployment.

“you can deploy the sagemaker in a few different modes right one of them is a gradual roll out one of them is an expedited roll out”transcript, stated

observability-tracing (deployment state)

MMM adds metrics, monitors, endpoint status, deployment state, and model usage tracking.

“it adds metrics in the right place it adds monitors in the correct places”transcript, stated

eval-driven-development (golden-data checks)

Deployments run validation and golden-data tests before production rollout.

“it tests against golden data test files”transcript, stated

fallback-degradation (deployment safety)

Users can abort deployments and retire models through the managed flow.

“at every single point of this uh flow they can abort be deploy as they wish”transcript, stated

Tradeoffs

Buy core platform primitives.

Chose Comet and SageMaker over Building or self-hosting every deployment primitive internally.

Rationale: The team used external tools for experiment tracking and real-time inference, then built a custom management layer where needed.

“we decided to just buy right we picked two main products for two big problems that we have one of those was Comet”transcript, stated

Generate deployment changes automatically.

Chose MMM code generation and auto-merge after tests over Manual PR authoring and review for routine deployments.

Rationale: Automation reduced human time while preserving validation and production safety.

“we now have zero lines of code written to actually do your deployment for most of our models”transcript, stated

Keep models as artifacts rather than repository-level releases.

Chose Versioned model artifacts over Repository release branches mapped to model versions.

Rationale: Artifacts preserve sharing and collaboration across models built on shared stacks.

“models are just artifacts we want as much of that to remain as just separate artifacts”transcript, stated

Gotchas (what bit them)

Monolith deployment blocked ML platform maturity.

Root cause: Every model needed backend changes and shared library compatibility.

Resolution: Move model serving into SageMaker-managed endpoints with standardized containers and MMM orchestration.

“you then go write some code in our core backend monolith Service”transcript, stated

External platform flexibility created user-facing complexity.

Root cause: SageMaker, Comet, batch jobs, backend code, metrics, and YAML configs had to be manually coordinated.

Resolution: Build MMM as a single UI and code-generation layer over those systems.

“all of this extra flexibility we given to people uh it became very very difficult to actually get things into production and manage them there”transcript, stated

Model lineage disappears without explicit version tracking.

Root cause: Retrained models, packages, and online serving versions change independently.

Resolution: Use Comet and MMM to track artifacts, deployed versions, endpoint states, and rollback information.

“keeping track of what version is being served online that becomes very complicated the lineage there is just lost”transcript, stated

Evaluation

Faire validates deployments with golden-data test files, configuration validation, shadow testing against production, endpoint health, deployment state tracking, and planned distributional-equivalence checks for shadow results.

Metrics: Golden-data test pass · Deployment wall-clock time · Human deployment time · Endpoint status · Shadow-test distributional equivalence · Rollback/version traceability · Monitors and metrics health

“there'll be Shadow testing in the flope completely automated completely hands off”transcript, stated
“make sure that results between the two are distributionally equivalent and then just have an auto approval”transcript, stated

Outcomes

The platform reduced deployment from roughly three days to four hours, with most of the four hours being testing wall-clock time and human effort around ten minutes or less.

“the actual human time there is 10 minutes if not less depending on you know complexity in their model”transcript, stated
“stability because every single thing is well tested before it ever rolls out to production”transcript, stated