Marks & Spencer is a leading British retailer bringing high-quality food, clothing, and homeware to millions of customers around the world at great value. With 959 stores across the UK and 100+ websites serving customers in the UK and abroad, the company generates and is trusted with a vast amount of data. Its customer loyalty program, Sparks, has more than 17 million members in the UK and Ireland. Marks & Spencer uses machine learning and data science workloads to gain customer insights and take actions to build brand loyalty, like recommending products based on past purchases, sending loyalty emails to rewards members, and creating targeted campaigns. The previous solution for data science workloads relied on many manual processes, and Marks & Spencer wanted a faster, less labor-intensive way to get models into production. The company turned to Azure MLOps v2 Accelerator to speed up development and deployment time, reduce manual processes, and improve the continuous integration/continuous delivery (CI/CD) process. This also helped reduce errors and failures in machine learning model production that will ultimately lead to better customer experiences.
“Marks & Spencer has more than 30 million customers and large amounts of data that require systems that can scale to process it. Azure Machine Learning allows us to build machine learning solutions that can scale and give customers the right offers and better service overall.”
Luis Arnedo Martinez, Machine Learning Platform Product Manager, Marks & Spencer
Data-driven sales
Behind the food, clothing, and homeware that Marks & Spencer supplies to millions of customers are thousands of employees committed to providing the best customer experiences. With this, the enterprise data and data science team is on an overall data transformation journey, in part focused on enhancing and building data science solutions for customer-facing services like the customer loyalty rewards program, marketing personalization, and its customer website. The team also works to improve internal operations like supply chain optimization, price optimization, and retail.
Within the data team is a lean machine learning operations (MLOps) division comprised of engineers that maintain the machine learning platform. This team defines the productionizing and deployment processes and standards for machine learning and manages cloud infrastructure provisioning for machine learning systems. It also works to increase the maturity of machine learning solutions through testing, monitoring, and establishing best practices.
Accelerating innovation
The data science team built the machine learning model for the customer loyalty rewards program and had spent a lot of time focused on productionizing it. Additionally, the team wanted the ability to separate production code from development code so that they could experiment and develop while the production code was stable and isolated. The separate environments allow developers to focus on updates, improvements, and innovation without affecting the final product.
MLOps v2 Accelerator ramps up production
Marks & Spencer had previously moved data science models for its rewards program to Azure Machine Learning. The company needed to scale the model and train hundreds of models in parallel, processing massive amounts of data faster by distributing the workload across multiple processors. This can be especially helpful in retail, where processes may need to be replicated for each individual store. By using ParallelRunStep, the migration achieved significant improvements in performance, reliability, and reduced execution time by 50 percent. Inspired by the results of the move, Marks & Spencer turned to Microsoft solutions to reduce manual processes and fulfill the goal of separating production and development code.
The MLOps team built a solution using Azure Machine Learning and Azure MLOps v2, a set of deployment templates data science teams can quickly use to set up and deploy machine learning models that are training large amounts of models. The new templates were integrated into the continuous integration/continuous delivery (CI/CD) pipeline so that deployments can be made directly in Azure Machine Learning. The CI/CD pipeline creates an efficient process that speeds up time to production through automated tests that help developers review code quality and perform bug fixes faster. “We had a great experience working with dedicated solutions architects from Microsoft. We received multiple demos and close feedback,” says Luis Arnedo Martinez, Machine Learning Platform Product Manager at Marks & Spencer. Azure Databricks handles data processing, extraction, transformation, and aggregation, including accessing and writing data into and from Azure Data Lake Storage Gen 2, Azure Data Factory handles the orchestration of pipelines, the CI/CD pipeline is built on Azure DevOps, and Azure Machine Learning handles model training and optimization.
For a larger version of this diagram, please see the Downloads section in the left-hand sidebar.
Building a robust machine learning system
Now, the MLOps team can seamlessly manage two Azure Machine Learning environments—one for development, another for production—and the CI/CD pipeline makes deployments directly. The new solution has significantly reduced time to deployment across environments, made it easier to run models, and reduced time constraints and bottlenecks for other teams at Marks & Spencer that use the output from the models. This helps employees who directly work in customer loyalty programs deliver rewards, products, and campaigns to customers sooner and more accurately.
The ability to scale is extremely important in retail. It allows businesses to keep up with rapid demand and momentum, especially during massive spikes in user traffic around holidays and sales days, without compromising on quality or efficiency. With Azure Machine Learning, Marks & Spencer has a system that can handle the ebbs and flows of customer sales and meet customer traffic without disruptions in customer service. “Marks & Spencer has more than 30 million customers and large amounts of data that require systems that can scale to process it. Azure Machine Learning allows us to build machine learning solutions that can scale and give customers personalized offers,” says Arnedo.
Overall, the MLOps team has gained a system that will better serve customers and internal processes. “The solution has increased the robustness of the machine learning system and made our system more aligned with other environments,” says Arnedo. For now, the retail giant will continue to deliver on the promise of providing high-quality goods to millions of customers while using machine learning models to continuously innovate and improve on customer experience.
Find out more about Marks & Spencer on Twitter, Facebook, and LinkedIn.
“We had a great experience working with dedicated solutions architects from Microsoft. We received multiple demos and close feedback.”
Luis Arnedo Martinez, Machine Learning Platform Product Manager, Marks & Spencer
Follow Microsoft