Problem
Spotify forecasts its key metrics quarterly, weekly and daily, and the user forecast is one of the most used business health indicators. Spotify now operates in more than 180 countries, and manual models no longer scaled. Markets differ: some have long history, some launched recently, and some depend on campaigns that no model can see. Tuning on one machine took months, so forecasts could not be refreshed quickly.
Example from the article: a market that is heavily campaign driven needs business input to produce an accurate forecast, so it goes to a separate custom-model track.
Solution in brief
The team built a pipeline that runs every week and on demand. After a data quality check it splits markets into three tracks: mature markets use time series models with distributed hyperparameter tuning, new markets use a proxy-based model, and special markets get custom models with human review. Core logic lives in a strictly tested library, while charts, emails and experiments stay in a looser layer.
Questions this case answers
- How to forecast a key metric for many entities when some have long history and some have almost none
- How to run a hyperparameter search over many time series on a schedule while keeping the production code reliable
- How to produce automated weekly user forecasts for every market, including markets that launched recently?
- How to forecast user growth in a new market that has almost no history?
Tools and methods
- Time series models with cross-validated tuning — forecasts for mature markets, tuned in parallel per market, split and parameter set.
- Proxy-market clustering — finds launched markets that resemble a new one and reuses their launch and growth curves.
- Dataflow (Apache Beam) — parallel processing for large data and model runs.
- Kubernetes with Docker — runs the smaller automated Python jobs.
- BigQuery — stores the parameter space to evaluate.
Google or a one-time email code. No password.