Leveraging MLOps to Deliver Improved Predictive Analytics for a Supply Chain Analytics Company
Our customer is a supply chain risk analytics company that delivers actionable insights to increase the resilience and agility of its clients’ supply chains, protecting revenue and reputation.
A significant part of our customer’s work includes delivering AI-powered predictive insights to anticipate future delays and disruptions in logistics for trucks on land and containers on the sea. To this end, the company developed a machine learning prototype to predict ETAs accurately and reduce overall uncertainty in logistics.
Wizeline leveraged our MLOps expertise to deliver operationalized machine learning, reducing the time it takes to train a model from an average of 3 weeks to 6 hours. Read more to see how we achieved this and increased the efficiency of our customer’s predictive analytics.
The Challenge: Automating Machine Learning Models to Save Time & Increase Efficiency
Logistics has an outsized role in today’s complex and hyperconnected world. Numerous unpredictable factors like weather disruptions affect shipping and delivery times, causing logistics companies to incur late delivery penalties since the industry generally operates under time windows for the arrivals to ensure the right crew is staffed to unload cargo.
Leveraging machine learning models to predict the delivery times and convey the uncertainty of a prediction as efficiently as possible is a worthwhile endeavor –– especially in this industry where failing on expected timelines costs money.
Our customer developed a prototype model to predict ETAs accurately, acknowledging the inherent uncertainty in logistics. Like many models, it started as a collection of Jupyter Notebooks that handled the machine learning model’s data preprocessing, training, and validation. This method, however, was time-consuming, inflexible, and expensive. To take its operations to the next level, the company needed a partner to help automate the training of the machine learning models to make them more maintainable and scalable.
Our Solution: Leveraging AWS MLOps Tools to Operationalize Machine Learning Models, Promoting Scalability & Experimentation
To get started, the Wizeline team assessed the existing code and developed an optimization plan. The team selected AWS Sagemaker as the core tool for the project since it allowed for custom models, promoting scalability and experimentation. The team migrated our customer’s highly specialized model into AWS Sagemaker, preserving its capabilities, and proceeded with the following steps:
Preprocessing: The team started by preprocessing the code, improving the overall code by making light modifications, and rewriting where necessary. AWS Elastic Map Reduce and AWS Glue were used as more robust and scalable data preprocessing solutions.
Model Training: After the preprocessing was complete, the team moved to the model training phase of the project. We used AWS Sagemaker for the training, as it only bills for the actual use of the instances, making it a cost-effective choice for our client. Within the Sagemaker platform, we also harnessed other benefits like the traceability of data and training artifacts.
In addition to training the model, we performed hyperparameter tuning, which was also made possible and easy with AWS Sagemaker. This contributed to the flexibility and reusability of the model for different feature sets or training parameters.
Model Serving and Monitoring: Once the model training was complete, we deployed the model in AWS Sagemaker, which is an excellent choice for models like this one with a continuous stream of prediction requests. It has a lot of perks, like autoscaling and automated logging of predictions.
Auto-scaling resulted in cost savings for our customer since instead of having a fixed number of computing instances to load the maximum amount of traffic expected, the number of instances is adapted to the varying traffic, saving instance hours.
AWS also allows for model monitoring using dashboards like Cloudwatch and better security for API keys using AWS Secrets Manager.
Results: Cutting the Time Spent Training ML Models From 3 Weeks to 6 Hours
In our journey from a prototype to a well-established infrastructure for machine learning, we focused on quick wins that compound, allowing us to move fast without sacrificing future development or scalability. This approach enabled other possibilities like experimenting more easily in breadth and depth. We were able to create many experiments to train test models with real traffic to see their performance in the real world.
In addition, automating our customer’s machine learning models using MLOps best practices enabled us to cut the time spent training models manually from an average of 3 weeks to 6 hours. The new, automated models are also flexible and scale up and down depending on the volume of prediction requests, saving costs and increasing overall business efficiency.