
It’s always inconvenient to start learning a concept with multiple and different aspects and components as MLOps, especially for beginners. I, myself, was a beginner in MLOps and getting a clear and general idea about it was quite hard. This tutorial aims to help you to acquire a clear and wide vision of MLOps. It will help you to better understand MLOps and will guide you in you journey to a better learning. As I write about MLOps, this tutorial is a good one to start with so let’s dive in!
Not a Medium member? No worries! Continue reading with this friend link.
Table of contents:
· 1. Introduction · 2. MLOps Workflow · 3. MLOps Principles · 4. MLOps Tools · 5. MLOps Best Practices · 6. Conclusion
My MLOps tutorials:
- Tutorial 1: A Key Start to MLOps: Exploring Its Essential Components
- Tutorial 2: A Beginner-Friendly Introduction to MLOps Workflow
- Tutorial 3: Introduction to MLOps Principles
- Tutorial 4: Structuring Your Machine Learning Project with MLOps in Mind
- Tutorial 5: Version Controlling in Practice: Data, ML Model, and Code
- Tutorial 6: Testing in Practice: Code, Data and ML Model
- Tutorial 7: Tracking in Practice: Code, Data and ML Model
[I will be updating this list as I publish articles on the subject]
1. Introduction

As the need to use Machine Learning models in everyday tasks and applications has grown, several challenges have arisen in including them in software. Thus, professionals and researchers came up with MLOps as an extension of DevOps on machine learning models to overcome these challenges. MLOps is defined as :
A set of techniques and practices used to design, build, and deploy machine learning models in an efficient, optimized, and organized manner. (you can read more about MLOps motivation and definition in my article : A Beginner-Friendly Introduction to MLOps)
By reading the previous definition, we can tell that there are so many "things" to know and to learn. Starting your learning journey may be difficult especially for beginners: you may wonder, what are these "things" ? What is each "thing" used for? where do I start learning?
To answer to all these questions, I decided to write this tutorial. There are so many topics to cover and articles that I have already written or plan to write in the future that I decided to group them together and organize them into 4 different main groups. I called these latter Mlops’ main ingredients!
Heumm, I know, I know! my answer brought up a new question: what are these ingredients? Well, quite simply it’s MLOps workflow, MLOps principles, MLOps tools and MLOps best practices. In this tutorial, we dedicate a section for each component.
2. MLOps Workflow

MLOps workflow defines the project pipeline starting from business problem to model deployment and performance monitoring. It includes the following steps in order:
- The business problem : represents the first step in MLOps workflow. It consists of defining the model workflow, the Artificial Intelligence canvas and/or the Machine learning canvas where we specify the model’s input and output, as well as the process and its various steps.
- Data engineering : includes a series of distinct steps to execute starting from collecting data in its raw form to a prepared dataset that is ready to be used by the ML model.
- ML model engineering : includes a set of crucial steps to define and select a ML model that aligns to the business problem’s requirements. It involves: model training, model evaluation, model testing and model packaging.
- Code engineering : is the forth step in MLOps workflow. This phase focuses on deploying the model to production and ensuring the quality of its predictions by observing its overall behavior and logging and saving its predictions.
Example: Autonomous vehicles often use a combination of computer vision techniques, depending on the specific tasks and requirements. For this tutorial, imagine you are working on a project to develop an image classification system to recognize various road signs, vehicles, pedestrians, and road conditions. Accordingly:
- In the business problem : we define that the first problem is to enable the autonomous vehicle to perceive and interpret its surroundings accurately. More precisely, enabling it to recognize and classify road signs, lane boundaries, pedestrians, and other vehicles to make informed driving decisions. Secondly, the system must also prioritize safety, not only for the passengers on board but also for all road users. As a result, based on the system’s real-time output and situational awareness, a set of actions is predefined and established such as speed reduction and other safety-related responses.
- In data engineering, the first step is to gather a diverse and representative dataset of images, captured in various weather and lighting conditions, road types, and traffic scenarios. Since it’s a classification task, a high-quality labeled data is essential for training and evaluation. Then the data is prepared to manage any issues related to data quality such as data imbalance and prepare scripts for resizing, normalizing, and augmenting images. Finally, select a data storage and management system that allows easy access to the training and validation data.
- In ML model engineering, we first select appropriate deep learning architectures, such as convolutional neural networks (CNNs), for image classification and experiment with various model architectures and hyperparameters (you can check my tutorial for a practical introduction to image classification). Second, we train the selected model on the dataset while optimizing accuracy, and considering efficiency and inference speed since autonomous vehicles require real-time processing. Then, we apply rigorous evaluation metrics, such as accuracy, precision, recall, and F1-score, to assess model performance; and implement cross-validation techniques and fine-tuning. Before packaging the model, we adapt the model for real-time inference on the vehicle’s hardware, considering latency and resource constraints.
- In code engineering, the model, that has been rigorously trained and evaluated, is integrated into the autonomous vehicle’s perception system. During real-time inference, we ensure the quality of the model’s predictions, extensive testing and monitoring: the model’s behavior is observed and logged in various real-world driving scenarios. These latter are used for anomaly and any unexpected or erroneous model behavior detection.
During development and after deployment, it may be necessary to return to a previous step to maintain the performance of the model over time. Therefore, these stages are typically carried out in a cyclic manner. This latter defines the MLOps lifecycle! To maintain the MLOps lifecycle understanding and respecting MLOps principles is mandatory. For more in-depth information or detailed insights, I invite you to consult my tutorial : A Beginner-Friendly Introduction to MLOps.
3. MLOps Principles

MLOps principles are a set of concepts that aim to maintain the MLOps lifecycle in order to avoid/reduce technical debt. They need to be applied across the different workflow steps described previously. These principles include:
- Versioning : ensures that changes made to the machine learning model, code, and data are tracked and managed efficiently so engineers and data scientists gain the ability to roll back to a previous version if needed, compare performance between different versions, and reproduce results.
- Testing : ensures the correctness and the efficiency of the MLOps pipeline so it reduces the risk of errors and bugs and enable to detect and fix the issues quickly.
- Automation : enables efficient and reliable implementation of the repetitive tasks and standardizes processes including building, testing, deploying and managing. It defines the level of project’s maturity , or in simpler words, it defines how free the system is from human intervention.
- Monitoring and tracking : ensure stability and reliability of the ML model in production. They help engineers and data scientists keep tabs on changes made to models and data, facilitating collaboration and troubleshooting when issues arise.
- Reproducibilty : allows to generate identical results giving the identical inputs regardless of the place of execution. It’s achieved by the previous principles to maintain consistency and trust in the results and for meeting regulatory or compliance requirements.
Successfully implementing these principles entails utilizing appropriate tools and following best practices as we will present in the next two sections. For more in-depth information or detailed insights, I invite you to consult my tutorial : Introduction to MLOps Principles.
4. MLOps Tools

MLOps tools encompass all the software, hardware, and systems that are employed in order to establish and maintain the MLOps workflow and principles. It mainly includes:
- Programming languages : such as Python and R.
- Libraries : such as machine learning and deep learning libraries (Scikit-Learn, OpenCV and Keras).
- Platforms : such as machine learning and deep learning platforms (MLflow and Jina).
- Frameworks : such as machine learning and deep learning frameworks (LightGBM and CNTK).
- Notebook Environments : such as Jupyter and Google Colab.
- Infrastructures : such as cloud computing-based and on-premises-based infrastructures.
Selecting the appropriate tools depends on several criteria such as the project requirements, the data type and volume and deployment targets. However, it is essential to know that the MLOps practice should be independent of them, in other words, it should be designed and implemented in a way that is independent of the programming language, machine learning framework, or underlying infrastructure used in a machine learning project to ensure that MLOps practices are versatile, adaptable, and not locked into any particular technology stack.
5. MLOps Best Practices

MLOps best practices are a set of well-established behaviors, disciplines, techniques or/and approaches that has proven to produce consistently favorable results and outcomes in MLOps. When working in machine learning projects, you find yourself coding and collaborating so there are three essential elements in play: the code, the teamwork and, of course, yourself! Therefore, I’ve categorized them into three distinct groups: best practices for code, best practices for teamwork, and best practices for personal development.
Best practices for code :
- The foremost practice to keep in mind is to respect the MLOps workflow and adapt its principles. There is no MLOps without the described workflow and principles.
- Numerous tools are specifically designed for MLOps applications; therefore, the careful selection of the technology stack is crucial. This choice not only favors harmony within the workflow but also ensure compatibility, in most cases, without the need for potentially thousands of lines of code.
- Code and resource optimization enhances the user experience, reduces operational costs, and ensures that the application perform efficiently, especially in resource-constrained environments like mobile devices or cloud computing platforms.
Best practices for teamwork :
- Collaboration between data scientists, engineers, and domain experts. Effective cross-functional teams are crucial to the success of MLOps.
- Establishing coding conventions helps ensure consistency, readability, and maintainability of the codebase while facilitating effective collaboration among team members.
- Project structuring improves the teamwork efficiency and helps create a well-organized, collaborative, and productive environment, enabling team members to work together efficiently and contribute to the project’s success. For more in-depth information or detailed insights, I invite you to consult my tutorial : Structuring Your Machine Learning Project with MLOps in Mind.
- Documenting code and project pipeline ensures that all team members have access to essential information, can understand each other’s contributions, and collaborate effectively. In addition, it facilitates knowledge transfer, reduces misunderstandings, and supports the project’s maintenance and sustainability.
- Incorporating comments to explain the purpose, assumptions, and constraints of your code is another aspect of code documentation.
Best practices for personal development :
- Keep yourself up to date with best practices and the latest technologies.
- Gain culture and explore new approaches and technologies.
- Be open to updating best practices since they can evolve over time due to advancements in technology, changes in industry standards, or new research.
- Share best practices within the professional community to help others benefit from proven methods and contribute to the collective knowledge.
Last but not least, these practices were only a portion of the stars in the sky, but they are the brightest ones!
6. Conclusion
Here we come to the end of this article. I hope you find it valuable and motivating! I’ve crafted this article with the aim of providing you with a solid foundation for MLOps. In upcoming articles, I’ll delve into MLOps tools and best practices. Additionally, I have plans to share tutorials on various MLOps technologies, with practical examples, so stay tuned for more insightful content.
Thanks for reading this article. You can find all the examples of the different tutorials I provide in my GitHub profile. If you appreciate my tutorials, please support me by following me and subscribing. This way, you’ll receive notifications about my new articles. If you have any questions or suggestions, feel free to leave a comment.
Image credits
All images and figures in this article whose source is not mentioned in the caption are by the author.