New Relic Now Start training on Intelligent Observability February 25th.
Save your seat.
현재 이 페이지는 영어로만 제공됩니다.

A new one emerges as if there aren’t enough acronyms in software development. If you’ve stumbled upon this article, it’s likely that you’ve heard the term “MLOPs” and are now wondering, “What is MLOps?” 

MLOps, an abbreviation for Machine Learning Operations, has become a buzzword in the world of artificial intelligence. In simple terms, MLOps is the practice of managing and streamlining the lifecycle of machine learning models, from development and testing to deployment and monitoring in production.

Just like DevOps, MLOps has its set of tools, best practices, and workflows to ensure the success of machine learning projects. Although MLOps is a relatively new concept, it's fast becoming crucial in organizations that are leveraging machine learning to achieve their business goals.

Key takeaways:

  • MLOps streamlines machine learning deployment in production environments.
  • MLOps bridges the gap between data science and operations teams.
  • MLOps addresses specific ML model management challenges.
  • Platforms like New Relic support MLOps with monitoring and optimization capabilities.

What is MLOps?

Machine learning operations (MLOps) is a set of practices to improve machine learning (ML) in large-scale production environments by increasing its quality, simplifying  its management, and automating its deployment.

MLOps is similar to DevOps, except it’s specific to machine learning ML systems. As more companies invest in artificial intelligence (AI) applications, there can be a lack of understanding between the data science teams developing machine learning models and the DevOps teams operating the applications that power those models. That’s where MLOps comes in.

Just as good DevOps practices bridge the gap between developer teams (devs) with operations (ops), MLOps practices bring together data engineers, data scientists, and MLOps engineers to build and deploy machine learning models at high velocity.

MLOps provides a tool for monitoring and observing the performance and effectiveness of machine learning models in a production environment. This increases the possibilities for collaboration between data science and DevOps teams, feeding into a continuous process of development, testing, and operational monitoring.

Many of the same principles apply to both MLOps and DevOps, such as the use of continuous integration (CI) and continuous delivery (CD) to keep development cycles and deployments running smoothly. However, there are some significant differences as well.

What are the main components of MLOps?

In some cases, MLOps may cover the entire spectrum from data management to model deployment and infrastructure monitoring and beyond. In others,  MLOps may only be used for model deployment. It all depends on the scope of the project, but the main MLOps components are:

  1. Data management: The organization, storage, and retrieval of data used in machine learning models. It involves processes such as data ingestion, transformation, quality assurance, and version control.

  2. Model training: The process of developing and fine-tuning machine learning models using training data. It includes tasks such as feature engineering, model selection, hyperparameter tuning, and model validation.

  3. Model deployment: Deploying the trained machine learning models into a production environment where they can be used to make predictions on new data. It includes tasks such as packaging the models into containers, managing dependencies, and setting up monitoring systems.

  4. Model serving: Handling incoming requests from users or applications and serving predictions from the deployed machine learning models. This process includes tasks such as load balancing, scaling, and handling errors or exceptions.

  5. Monitoring and logging: Tracking the performance of deployed models by collecting metrics and logs from various sources such as model serving platforms and application servers. This helps identify issues or anomalies that might affect the performance of the models.

  6. CI/CD: Automating the process of building, testing, and deploying machine learning models to ensure that changes are implemented smoothly without disrupting existing workflows.

  7. Infrastructure management: Managing all the underlying infrastructure required for running machine learning models in production environments. It includes tasks such as provisioning resources, configuring networks and managing security policies.

  8. Collaboration tools: These tools facilitate collaboration among data scientists, engineers, DevOps teams, and other stakeholders involved in developing and deploying machine learning models.

What are the benefits of MLOps?

While MLOps and DevOps are different practices, they have some similar goals:

  • Faster development cycles and rapid innovation
  • Reliable, scalable, and highly performant systems
  • Improved collaboration between teams

MLOps also includes goals beyond DevOps that are specific to the field of machine learning, including:

  • Accurate models in production
  • Automated MLOps workflow, from experiments to training models to maintaining models in production
  • Reproducible workflows and models, especially because it can be notoriously difficult to replicate a model’s predictive behavior

Ultimately, the goal of MLOps include both general DevOps goals and the more specific goal of faster go-to-market times and lower operational costs, ensuring that learning models are working predictably and accurately, which is a huge challenge in itself.

Why is machine learning important?

Machine learning systems learn or improve their performance based on the data they consume. A well-designed machine learning system can predict behavior based on past behaviors or automatically and accurately classify data in increasingly complex environments, augmenting human capabilities and freeing up engineers to focus on other strategic tasks.

What is the difference between MLOps and DevOps?

We can think of MLOps as being comparable to DevOps but with concerns that are specific to machine learning. Since machine learning is based on both code and data, it isn't just about writing and maintaining code—it’s also about managing and analyzing data.

First, through machine learning experiments, data scientists fine-tune algorithms (code) that process data. Once the code is in place, the next step is for data engineers to train the model with large amounts of data.

An effective DevOps practice includes automating processes around code (like deployment and testing). But with MLOps, there are multiple considerations related to the underlying data, including automating the process of training models with relevant subsets. And because real-world data is often messy and constantly changing, MLOps teams and data engineers also need to pay close attention to the quality of the data they use in training.

For example, you could create a neural network designed to recognize faces, but if the network only receives pictures of narwhals, it’s not going to work effectively. In other words, your algorithms will only work as expected if you have good data.

It’s hard enough to manage code deployments and ensure that your systems are working correctly in production. Adding data to the mix creates an additional layer of complexity. Here are just a few of the concerns that engineers working with machine learning—and, by extension, MLOps practitioners—have to consider:

  • Experiments: Data scientists must run procedures that test hypotheses. For example, a data scientist might test an algorithm with different variables to determine which variable leads to the most accurate predictive model.
  • Training data: Data is necessary to train models. The wrong training data (for instance, too many narwhal pictures) can result in models performing poorly in production. Getting good training data is even more challenging when data already tends to be messy and incomplete.
  • Model accuracy: Just because a model performs well in training doesn’t mean it will perform well in the real world. Models need to be monitored in production to ensure they are accurate.
  • Model robustness: Small changes in inputs should only cause small changes in a model’s outputs. A single picture of a narwhal shouldn’t cause a model to expect all foreheads to have horns. That would be a small input with a disastrously large output.
  • Model bias: Machine learning models with high bias cannot accurately make predictions.
  • Concept drift: Data changes over time, and if machine learning models aren’t updated with recent data, their predictions become less accurate because they are based on outdated information.
  • Model explainability: It can be very difficult to understand how a machine learning model learns and makes its predictions. This can make it even more difficult to fix issues when something goes wrong.
  • Machine learning governance and compliance: Machine learning is still a recent field with many legal, ethical, and moral considerations.

All of these concerns are specific to MLOps practices.

What is the difference between MLOps and AIOps?

It’s also important to distinguish between MLOps and artificial intelligence operations (AIOps), because these terms are not interchangeable. Let’s take a quick look at the difference.

  • AIOps is about using machine learning to automate your DevOps processes. For instance, you might be using artificial intelligence to find patterns in large data sets, which you could then apply to your DevOps practice. In this case, you are using artificial intelligence to enhance your DevOps workflow.
  • MLOps is about using DevOps to improve your machine learning development pipeline and relying on DevOps to enhance your machine learning development processes.

In short, you use MLOps to apply DevOps practices to a machine learning development pipeline, while you use AIOps to apply artificial intelligence to your DevOps practice.

While they aren’t interchangeable, they also aren’t mutually exclusive—you can use both in your workflow.

Who uses MLOps?

MLOps is becoming essential for companies with machine learning models. It helps unlock revenue sources, save time, and cut costs through efficient workflows. Eventually, most companies should adopt MLOps for smooth model operations. Now, let's explore the teams using and benefiting from MLOps.

  • Data engineers build and maintain the infrastructure that is used to collect, store, and analyze data and provide the foundation for developing ML models. Data engineers also create data pipelines that ingest and process raw data, making it usable for data scientists and machine learning models.
  • Data scientists who work in the field of machine learning run experiments to determine which algorithms and variables are most effective for machine learning models. Data scientists play a key role in the entire MLOps lifecycle, from gathering data to ensuring model efficiency in production. 
  • ML engineers are responsible for developing machine learning models and algorithms for the organization to use. They deploy, maintain, and optimize ML models after data scientists have built them.

There’s a lot of overlap between the work that data engineers and data scientists do, which leaves room for potential issues. For instance, a team of data engineers might build a system that aggregates data in a way that’s difficult for data scientists to incorporate into an ML model. Or there may be challenges for MLOps engineers to deploy the models that data scientists are building. An effective DevOps practice ensures that teams are collaborating well when their work overlaps and the same is true for an MLOps practice, too.

 

The Model Performance Metrics dashboard in New Relic displays a wide range of model and data metrics.

Best practices for machine learning operations 

Implementing MLOps effectively involves following several key practices to automate the training of machine learning models efficiently. Some of these practices include:

Clearly define your project

You should start by defining the scope of your project, setting goals and objectives, and identifying key stakeholders. Having a clear understanding of your project will help you determine the necessary resources and tools needed for successful implementation.

Choose ML tools wisely

Selecting the right tools for your MLOps practice is crucial. There are a variety of tools available, so it's important to research and understand which ones will best fit your specific needs. These tools should enable you to easily manage and monitor your models, track key metrics, and automate processes.

Automate all testing

The first best practice of MLOps is automating all processes. This includes automating testing to ensure that your models are performing accurately and consistently. By implementing automated testing, you can catch any errors or issues early on in the training process, saving time and resources.

Strive for continuous integration and delivery

To achieve continuous integration and delivery in MLOps, leveraging tools such as Jenkins or GitLab is crucial. This allows for faster and more efficient deployment of models.

Apply data version control (DVC)

Data version control (DVC) is a set of practices that involve the management of data, models, and experiments in machine learning projects using tools that resemble software version control systems. DVC helps track and manage changes to datasets, machine learning models, and the associated metadata. 

By applying version control to data and models, teams can ensure reproducibility and traceability and facilitate collaboration. It allows data scientists and machine learning engineers to revert to previous versions of their work, share their progress with others, and manage the complexity that arises from the ever-evolving nature of machine learning projects.

Implement robust security measures

Data security is a top priority in MLOps, especially when dealing with sensitive data. Implementing security measures such as encryption and access control is crucial to prevent unauthorized interception and usage and ensure the overall integrity and confidentiality of your models.

Continuous monitoring and logging

Just like with any other software, monitoring and logging are crucial in MLOps. These practices help keep track of the performance and behavior of the models, enabling quick detection and resolution of any issues.

How does New Relic support MLOps?

With the introduction of ML model performance monitoring, New Relic helps data science teams measure machine learning model performance while collaborating with DevOps teams to get additional context on their business impact. Through a number of MLOps integrations, New Relic brings full observability to MLOps practitioners, allowing teams to incorporate MLOps best practices like:

  • Monitor machine learning models in production.
  • Continuously monitor data across the full MLOps lifecycle.
  • Instrument, analyze, troubleshoot, and optimize machine learning application performance.
  • View custom dashboards from multiple MLOps observability tools in a central operational dashboard in New Relic.
  • Alert on a wide range of issues from data drift to model bias.