Scaling Machine Learning as a Service

Li Erran Li, Eric Chen, Jeremy Hermann, Pusheng Zhang, Luming WangPAPIs 2016

Introduction

Moving machine learning (ML) from a researcher’s experimental environment to a mission-critical production setting presents significant engineering hurdles. At Uber's scale, these challenges are amplified by the need to manage thousands of models across hundreds of cities globally. This paper details the development of a scalable "Machine Learning as a Service" (MLaaS) platform designed to automate the end-to-end ML lifecycle, ensuring consistency, accuracy, and operational efficiency.

The Challenge of Production ML

Uber identified three primary bottlenecks in their scaling efforts:

  1. Feature Engineering Inefficiency: Data scientists frequently re-engineered the same features for different models, leading to "training-serving skew" where training data and real-time production data diverged.
  2. Global vs. Local Accuracy: A single global model often fails to account for local nuances (e.g., traffic patterns in London vs. Cairo), yet training individual models for every city is operationally prohibitive and suffers from data sparsity in new markets.
  3. Deployment Complexity: Manually managing the deployment and monitoring of thousands of models across multiple data centers is slow and prone to human error.

The Michelangelo Platform Architecture

To address these issues, Uber developed a unified architecture known as Michelangelo. The platform automates the workflow from data ingestion to real-time serving, evaluation, and monitoring.

The Michelangelo platform architecture, detailing the flow from data preparation and feature stores to model training, evaluation, and deployment.

The Feature Store

A core component of the platform is the centralized Feature Store. This repository allows teams to share and discover features, utilizing a "dual-stack" approach to eliminate skew. It uses Apache Spark and Hive for batch processing (training) and Samza and Cassandra for low-latency streaming (real-time prediction). By using identical feature definitions across both paths, the system ensures that the data used for training matches the data available at inference time.

Partitioned Models

To balance global patterns with local nuances, the platform supports a hierarchical "Partitioned Model" framework. Models can be trained at global, country, and city levels. If a specific city lacks sufficient data to train a robust local model, the system automatically falls back to a higher-level parent node (e.g., the country or global model), solving the "cold start" problem for new regions.

Case Study: UberEATS Estimated Time to Delivery (ETD)

The platform's capabilities are best illustrated by the UberEATS ETD use case. Predicting delivery time requires a complex blend of restaurant features (location, average prep time), contextual features (time of day), and near real-time features (order volume, courier availability).

The ETD prediction pipeline, showing how Hive data and real-time app signals flow through the feature store and trained models to generate delivery estimates.

Key Results and Performance

The implementation of this MLaaS platform has yielded significant operational improvements:

  • Low Latency: The real-time serving infrastructure achieves a 99th percentile latency of 20ms for ETD requests, even during peak demand.
  • Massive Scale: The system manages over 400 city-level partitions for single use cases, treating them as a single logical entity for management purposes.
  • Deployment Efficiency: "One-click" deployment via Docker containers and the TChannel RPC service has drastically reduced the time required to move models from experimentation to production.

Future Directions

While the platform is highly effective for standard regression and classification, future work focuses on expanding support for deep learning and specialized hardware like GPUs. Additionally, the team is working on automated resource management to optimize the massive compute requirements of training partitioned models at scale.

Summary updated

BibTeX
@inproceedings{li2016scaling,
  author = {Li Erran Li and Eric Chen and Jeremy Hermann and Pusheng Zhang and Luming Wang},
  title = {{Scaling Machine Learning as a Service}},
  booktitle = {PAPIs},
  year = {2016},
}
Figure