---
title: "The Magic of Merlin: Shopify's New Machine Learning Platform"
description: "Merlin is Shopify's redesigned ML platform built on open source tools."
url: "https://swe.quest/articles/the-magic-of-merlin-shopify-s-new-machine-learning-platform-f17a810670837d2b"
canonical: "https://shopify.engineering/merlin-shopify-machine-learning-platform"
source: "Shopify Engineering"
published: "2022-04-06"
difficulty: "medium"
kind: "Case study"
reading_minutes: 13
tags: ["ml-platform","kubernetes","model-training","python"]
---

# The Magic of Merlin: Shopify's New Machine Learning Platform

A post on [Shopify Engineering](https://swe.quest/sources/shopify.md), published 2022-04-06, 13 min read, Case study. Original: [https://shopify.engineering/merlin-shopify-machine-learning-platform](https://shopify.engineering/merlin-shopify-machine-learning-platform)

## Summary

Merlin is Shopify's redesigned ML platform built on open source tools. It uses Ray clusters running on Kubernetes as short-lived, per-use-case "Merlin Workspaces", and "Merlin Projects" are Docker images with isolated Python environments built through CI/CD. Data scientists prototype from JupyterHub through the Ray Client, then productionize by scheduling Airflow DAGs that create a workspace, run the job and tear it down, with Datadog and Splunk for monitoring. Onboarding the product categorization model took few code changes: Ray Train distributed TensorFlow training, and Ray ActorPool distributed multi-step batch inference.

Written by swe.quest, not by the author.

**Difficulty:** Medium: assumes a working developer; shows how it is built or done

## Topics

- [ML platforms](https://swe.quest/tags/ml-platform.md) (AI & ML)
- [Kubernetes](https://swe.quest/tags/kubernetes.md) (Infrastructure)
- [Model training](https://swe.quest/tags/model-training.md) (AI & ML)
- [Python](https://swe.quest/tags/python.md) (Languages)

## Prerequisites

- ML training workflows ([easy posts on Machine learning](https://swe.quest/tags/machine-learning.md?difficulty=easy))
- Kubernetes basics ([easy posts on Kubernetes](https://swe.quest/tags/kubernetes.md?difficulty=easy))
- Python distributed computing ([easy posts on Python](https://swe.quest/tags/python.md?difficulty=easy))

## Keywords

Merlin, Ray, Ray Train, Ray ActorPool, Kubernetes, Airflow, TensorFlow, JupyterHub

## Related posts

- [Unlocking Real-time Predictions with Shopify's Machine Learning Platform](https://swe.quest/articles/unlocking-real-time-predictions-with-shopify-s-machine-learning-platform-f4124fdd81e9cd3f.md): Shopify Engineering · 2023-03-10 · Medium · 13 min read · ML platforms, Inference & serving, Kubernetes, Deployment, Python
  Shopify extended its Ray-based Merlin ML platform with online inference, running each real-time model as a dedicated service in its own namespace on GKE that loads models from the Comet ML registry and can read features from the Feast-based Pano store.
- [Zalando's Machine Learning Platform](https://swe.quest/articles/zalando-s-machine-learning-platform-ccf6f0b2dc8025a9.md): Zalando Engineering · 2022-04-18 · Medium · 8 min read · ML platforms, Cloud platforms, Infrastructure as code, Python
  Zalando's ML platform takes ideas from experimentation in a hosted JupyterHub (Datalab), Databricks and a GPU HPC cluster to production pipelines orchestrated by AWS Step Functions.
- [Shopify's Playbook for Scaling Machine Learning](https://swe.quest/articles/shopify-s-playbook-for-scaling-machine-learning-01ef31091481dd96.md): Shopify Engineering · 2022-02-11 · Easy · 12 min read · ML platforms, Machine learning, Threat detection, E-commerce
  Shopify's approach to scaling machine learning grew out of its first ML product, an order fraud detector that replaced a rule-based system with a high false-positive rate.
- [Training Orchestrator: Unifying Model Training at Yelp](https://swe.quest/articles/training-orchestrator-unifying-model-training-at-yelp-28e0641de090c84f.md): Yelp Engineering · 2026-07-14 · Medium · 12 min read · ML platforms, Model training, Python, Testing
  Yelp's Training Orchestrator replaces per-team monolithic Spark training scripts with a declarative, configuration-driven framework.
- [Introducing Trackio: A Lightweight Experiment Tracking Library from Hugging Face](https://swe.quest/articles/introducing-trackio-a-lightweight-experiment-tracking-library-from-hugging-face-7dee3b3ee964ad19.md): Hugging Face · 2025-07-29 · Medium · 7 min read · ML platforms, Observability, Python, Open source
  Trackio is a free, open-source Python experiment tracking library that works as a drop-in replacement for wandb's init/log/finish API.

Browse: [Latest posts](https://swe.quest/index.md) · [Topics](https://swe.quest/tags.md) · [Sources](https://swe.quest/sources.md) · [Topic map](https://swe.quest/map.md) · [Site guide (llms.txt)](https://swe.quest/llms.txt)
