DEV Community

Cover image for Operationalizing Deep Learning With Minimal Effort by Automating MLOps
Alexandra Quinn
Alexandra Quinn

Posted on

Operationalizing Deep Learning With Minimal Effort by Automating MLOps

Operationalizing ML pipelines for deep learning applications is extremely challenging. Operationalization can take months and many resources, unless you have a holistic view of the pipeline. It’s a notoriously complex endeavor.
In this post, we’ll discuss how to take deep learning pipelines from the research environment to production. We’ll do it with minimal effort and without a single line of code. All with the help of MLRun, an open source MLOps orchestration framework that is built and maintained by Iguazio.

The Challenges of Operationalizing Deep Learning Models

Today, most data scientists begin MLOps by developing in the research environment. They will take the data, prepare it, train the model and evaluate it. However, when moving to production, this process breaks down.
This is because:

  • The live model requires performance monitoring, tests and evaluation, logging of every training/retraining process and versioning. Without this step, the best version of the model can’t be passed onto the next phase in the production pipeline.
  • Live data needs to be processed to make it usable for the production model.
  • Predictions need to run fast and at scale, requirements that need to be part of the strategy in advance.
  • Teams al ong the MLOps pipeline are siloed from each other.

Automating the Deep Learning Process

Traditionally, moving from development to production is a manual process:

  • A data scientist develops on Jupyter, PyCharm or Visual Studio.
  • Different stakeholders use the output to build a container on Kubernetes, scale to multiple containers, operationalize, perform integrated data engineering and deploy.
  • In addition, adding instrumentation is required to gain visibility for monitoring. By automating the entire process, we can make it more efficient, fast and continuous.

Orchestrating the Deep Learning Pipeline with MLRun, an Open Source Framework

MLRun is an open source project built and maintained by Iguazio for automating the MLOps pipeline with a “production-first” mindset. MLRun is particularly suited to enable MLOps for deep learning use cases. MLRun is made up of five key components:

  • Model development - MLRun is seamlessly integrated to the most used ML/DL frameworks, such as SciKit-Learn, Tensorflow, PyTorch, XGBoost and more. With a single line of code MLRun reads and wraps your training code, providing automatic logging, profiling, versioning and distributed training.
  • Real-time serving pipeline - for deploying data and AI pipelines with serverless technology. This is especially complicated in deep learning, because it requires deploying complicated processes like NLP and image processing.
  • Model Monitoring - for monitoring, detecting data/concept drift and remediation.
  • CI/CD for ML/DL - across code, data and models.
  • Feature Store - for building and sharing features, including their metadata MLRun’s automation is enabled through serverless computing. The engines take the code, turn it into an horizontal scaling piece of code, and then everything is built into that piece of code. To dive into each component and see how they enable automation for deep learning, you can read the full blog post here.

Deep Learning MLRun Demo

To see an example of how to use MLRun with a deep learning application, check out the demo here. This demo showcases a mask detection application, to slow down the spread of COVID-19 in public spaces. This example demonstrates how MLRun can be added to an existing training and serving code (in Tensorflow and in PyTorch) to train a model that classifies whether a person in an image is wearing a mask or not, with MLRun's deep learning auto-logging and distributed training, and serves it to an HTTP endpoint.
Read the complete blog here.

Top comments (0)