On Business and Pleasure

The door is ajar and I push through slowly, unsure for a second if I should have knocked. He looks up from his desk. He has been expecting me of course, sending me a text saying he could see me…

Smartphone

独家优惠奖金 100% 高达 1 BTC + 180 免费旋转




The importance of building pipelines

Machine Learning explained

What is an ML pipeline, and why is it important to build it properly

Similarly to a physical pipeline, the ML pipeline consists of a sequence of stages, or elements, organized so that the output of one element is the input of the following one. An ML pipeline models your machine learning process, starting from writing code to releasing it to production, including performing data extractions, creating trained models, and tuning the algorithms. With ML pipelining, each part of your workflow is extracted into an autonomous service. This way, every time you create a new workflow, it’s possible to choose the elements you need and use them how you need them.

Different stages of ML Pipeline
Different stages of ML Pipeline

The whole process of ML model preparation consists of several steps. This framework represents the most basic way the engineers in our team handle machine learning, as all of the complex tasks of the ML lifecycle can be dealt with using pipelines.

Gathering the needed data is the start of the process. At this point, our data engineers determine the data that they will use for training. It’s now crucial to define the problem as clearly as possible. Also, we make sure to get access to a vast set of data.

After sourcing, the client’s data passes through a list of alterations. We analyze it and prepare it for the training process. The necessary measures are:

Mostly we opt for using data-centric languages and instruments to search for patterns in the data. When data is ready, we start designing features - data values that our model will use for training and production. It includes:

The next move in our workflow is algorithm choice, as the soul of any model is a mathematical algorithm that determines the way a model will find patterns in the data. Some models are perfect for sequences like pieces of a written text; others better deal with images or numbers, music, etc. Depending on the various factors we feed the algorithms with specific data and tune them to get the best model performance. The main factors which influence the choice of data are:

It is the central part of the entire process. The process of training an ML model involves providing an ML algorithm with training data to learn from. The term ML model refers to the model artifact that is created in the training process. The process of model training is highly dependent on two main things:

The result of the described process is the artifact of the working model, but, obviously, we should test the model before using it.

We always evaluate a model we trained to determine how good it is at predicting the target on new data. It’s also essential to check its accuracy on data for which we know the target answer. Later we use it to evaluate predictive accuracy on the test dataset.

You can’t evaluate an ML model’s predictive accuracy with the same data used for training, as models can “remember” the training data, not generalize from it.

Talking about supervised learning, we compute a summary metric that says if and how accurately the predicted and actual values match by comparing the predictions delivered by the ML model against the known target value.

After evaluation, we try to see what can be further improved in the training in any way. That is called tuning the parameters. For example, we can run through the training dataset multiple times during training, leading to higher accuracy.

One more parameter, which can be tuned, is “learning rate”, which marks how far we shift the line during each step, using the information from the previous one. These values are crucial and defining the accuracy and the amount of time needed for the training. Only after we’re fully satisfied with the training are we ready for the next big move.

The last stage in implementing the ML model to the production area is deployment. At last, the customer can use it to get the predictions generated on the live data. As soon as the chosen model is produced, it is typically deployed and embedded in decision-making frameworks. It might be deployed for offline and online predictions. Moreover, more than one model may be deployed to enable a safe shift between old and new models. Talking about scalability, various parallel pipelines can be created to suit the load. It isn’t difficult to implement as the ML models are stateless.

One of the most considerable challenges of ML modeling is understanding when the model development phase is finished. It might be tempting to continue refining and improving the model endlessly. So we agree on what success means even before the process begins by considering the level of accuracy sufficient for our requirements as well as the results of the equal level of error. At the Evaluation stage, we get the answer to the asked questions of a certain quality. If the quality is satisfying, we have reached our goal.

MLOps tools is a handy way to reduce the amount of routine work in your ML pipeline

Building an efficient pipeline may seem a bit daunting, but using proper tools makes it much more enjoyable. So what exactly do MLOps tools help us with? They:

Here’s a brief overview of tools that our engineers may use, depending on the goals they have.

MLflow, an open-source platform, is a tool that helps us handle the ML lifecycle. It includes:

It offers a set of lightweight APIs that are compatible with any existing ML application, language, or library. MLflow fits for individual engineers and teams of any size.

SageMaker by Amazon is a fully-managed service that allows us to:

It incorporates modules that can be used collectively or separately, easily and effortlessly, without any loss of clarity or control. Being effective and flexible, it’s a fully managed service, so we don’t need to handle any administrative tasks. It’s cost-effective. For example, its data labeling service SageMaker Ground Truth offers automatic data labeling, which reduces expenses on data labeling by up to 70%, thus saving customers’ budget.

Google Cloud Platform (GCP), is a suite of cloud-based computing services designed to support a range of common use cases; from hosting containerized applications, such as a social media app, to massive-scale data analytics platforms, and the application of advanced machine learning and AI.

The tool from GCP helps engineers to deal with MLOps, combining Kubeflow Pipelines with TensorFlow Extended. The first is an open-source platform for running, monitoring, and handling pipelines on Kubernetes. The latter is an open-source library for numerical computation and large-scale ML. TensorFlow receives information in the form of multi-dimensional arrays of higher dimensions or “tensors”. Multi-dimensional arrays are convenient in managing large amounts of data.

So, in such a way, by using services from GCP, AWS, or other MLaaS providers, we could use ready-made solutions to accelerate or even exclude, in some way, our routine tasks and concentrate on solving business problems instead of digging into already solved technical problems.

ML Pipelines allow you to easily reuse, replace or re-combine specific parts of you data flow
ML Pipelines allow you to easily reuse, replace or re-combine specific parts of your data flow

The primary benefits of using pipelines for our ML workflows are numerous:

Thus, it’s essential to understand what is happening at each stage of the ML pipeline. Knowing this information, you can make work more transparent for stakeholders and productive for the team.

Add a comment

Related posts:

Hunting for Insights

Before I was a data scientist I was a coder. My introduction to making computers do things for me was through web development. After reading a book by Michio Kaku about how technology was changing…

Jasa Pembuatan Green House di Aceh Jaya

Perusahaan Konstruksi Spesialis & Profesional di Bidang Pembuatan Green House Sekala Kecil, Menengah Dan Besar Dengan dukungan team ahli kita akan mendesain Green House sesuai dengan kebutuhan dan…

Meminta Izin

Arthur memasukkan ponselnya pada saku jaket yang dia pakai begitu Sarla membalas pesan darinya. Laki-laki itu sudah sampai di arena tempat dia akan melangsungkan balapan, tapi begitu Sarla…