Kubeflow — Your Toolkit for MLOps
In MLOps, different platforms work within the data science environment and hold their grips concerning their services — one of which is Kubeflow.
Before understanding the specialties of Kubeflow and its importance, it is necessary to know what is MLOps and why we need it.
What is MLOps? Why do we need it?
MLOps, also referred to as Machine Learning Operations, combines Data Science, software engineering, and DevOps practices. Whenever a data scientist builds a model that runs seamlessly and provides a high-performance output, it needs to be deployed for real-time inference.
Calling a DevOps engineer for this task is sometimes helpful because a DevOps engineer has hands-on experience in software engineering and development operations, but monitoring a model and dataset in real-time can be sophisticated.
To resolve this, the MLOps community becomes a lifesaver. Having hands-on experience in MLOps helps the organization build automated, end-to-end data science pipelines from developing the model to production, feature generation, monitoring, and repeating the whole process.
Many organizations provide different MLOps platforms to create an automated pipeline so that the respective team can orchestrate their model and dataset for real-world inference. This is where we start discussing Kubeflow.
Kubeflow
When it comes to maintaining ML systems, it sometimes becomes complex when managing platforms, applications, and resources. Serving a model into production is not about building a Machine Learning code.
It also requires other steps, such as data collection, feature engineering, process management, configuration, etc. Sometimes existing solutions do not cover all the processes needed for ML.
Therefore, Kubeflow provides the solution for creating state-of-the-art ML apps and deployment and the entire Data Science Lifecycle.
Kubeflow is an open-source project designed specifically for MLOps. It provides easiness to the organization and the team to build, deploy and monitor scalable and portable ML systems.
It is built on Kubernetes, which helps the platform operate on different environments and multiple servers.
Kubeflow is built on three principles.
1. Composability
2. Portability
3. Scalability
Composability
Building a machine learning model isn’t the end goal for a data scientist; it takes more than that. Composability refers that each stage in ML being an independent system.
For example, we divide our work process into different systems. Each system can have its preferences, like using different versions of TensorFlow in other parts of the project.
Through this, Kubeflow uses the Kubernetes power to process and configure steps with Machine Learning libraries and frameworks.
Portability
Portability refers to running your projects anywhere on Kubeflow. It helps run your projects in different environments without worrying about the platform’s specifics.
Whether the team runs the process on a laptop, on-premises server, or the cloud, Kubeflow handles the abstraction and lets the team focus on the code.
Scalability
When an ML project requires more resources such as CPUs, GPUs, or TPUs, the Kubeflow platform automatically scales them up for those resources and releases them when they are not needed.
It also helps the project scale across different teams or run various experiments. Kubeflow adds the resources in need to other environments to seamlessly run the environments.
Components of Kubeflow
Up till now, we have learned about Kubeflow and its principles. Kubeflow has been divided into different components that help the platform process and work. Kubeflow consists of various components, namely:
1. Central dashboard
2. Kubeflow notebooks
3. Katib
4. Kubeflow pipelines
5. KFServing
Central Dashboard
Central Dashboard is the user interface of your dashboard. It helps the user to interact with the platform seamlessly. You can view your models’ information, create different IDs or namespaces when working with a team, manage feature stores and notebooks, etc.
The central dashboard contains a lot more behind its simple and perfectly created user interface. Even having little knowledge of data science, any person can use the dashboard for their specific needs.
Kubeflow Notebooks
Jupyter notebooks are considered as the base of MLOps. Because of its importance, Kubeflow also consists of integrated environments. Therefore, the notebook has always helped develop models, perform data analysis, quick tests, etc.
Usually, it is common for any data scientist to get restrained by their limited resources when performing analysis on a large dataset or training a giant model for days.
With the help of Kubeflow’s online notebooks containing ample amounts of storage, GPUs, and TPUs, these problems find their solutions.
Katib
Hyperparameter tuning plays a vital part in the development of any model. Katib can be used for hyperparameter tuning in an automated manner.
However, sometimes it becomes rigorous to manually search for hyperparameters in an organization.
Katib helps you to optimize the hyper-parameters around the model you choose against your chosen performance metrics and displays the results in a visual format.
Kubeflow Pipelines
Kubeflow pipelines are considered one of the essential components of MLOps. The pipeline helps the team define the flow of all the processes from collecting the data and serving the model.
All the pipeline steps are based on containers, which eventually makes it scalable and portable. Since all the steps are independent, they can be shared across multiple environments.
Because of its independence, any step can be used across different pipelines for testing and experiments.
KFServing
Kubeflow can be used to serve the models across different frameworks. If required, you can also attach your own serving system. Such like these is KFServing, which helps to abstract the most common Machine Learning frameworks.
KFServing is built on Knative, a framework for running serverless apps on Kubernetes.
With the help of KFServing, you can serve your model according to your requirements access required resources without going into the complexities directly.
Conclusion
The use of MLOps within the industry is trending exceptionally. Different platforms are required to automate these processes. One of which we went through was Kubeflow, platforms such as these, which helps the data science community store, build, maintain, and monitor datasets and models.
Providing state-of-the-art solution architecture helps avoid tedious processes that can be done within a few hours.
On the contrary, the flexibility of Kubeflow also allows you to run your jobs anywhere you can run Kubernetes and an entire platform to work with.
References:
Kubeflow Components. (2020, April 25). YouTube. Retrieved April 15, 2020, from https://www.youtube.com/watch?v=dC659IsHNyg
Author Bio
Hassan Sherwani is the Head of Data Analytics and Data Science working at Royal Cyber. He holds a PhD in IT and data analytics and has acquired a decade worth experience in the IT industry, startups and Academia. Hassan is also obtaining hands-on experience in Machine (Deep) learning for energy, retail, banking, law, telecom, and automotive sectors as part of his professional development endeavors.