Automating Machine Learning Pipelines

Creating a Machine Learning model is a difficult task because we need to write a lot of code to try different models and find out the performing model for that particular problem. There are different libraries that can automate this process to find out the best performing Machine Learning model but they also require some coding.

What if I tell you that we can run multiple AutoML algorithms to find out the best model architecture for classification problems in a single code cell? Model search helps in implementing AutoML for classification problems. It runs multiple ML algorithms and compares them with each other. It creates a search space where we can customize the type of layer we want in the neural network.

Model Search, an open-source Python library that offers an effortless way to run multiple AutoML and find out the best one. It is highly useful time-saving and works effortlessly.

In this article, we will explore Model Search and some of its functionalities.

Let’s get started…

Installing required libraries

We will start by installing Model Search using pip installation. The command given below will install Model Search using pip.

!git clone
%cd /content/model_search/

Importing required libraries

In this step, we will import all the libraries that are required for creating the model and train the models to find the best model.

import model_search
from model_search import constants
from model_search import single_trainer
from import csv_data

Creating the Model

Now we will directly create the model. We will use the CSV data already stored in the model search. In order to create the model we just pass all the required parameters and start training.

trainer = single_trainer.SingleTrainer(
        record_defaults=[0, 0, 0, 0],

As we can see here the models are being trained. Now we can also print the best model and its parameters.

!ls /tmp/run_example/tuner-1/

Here you can see the best-performing model. All the model files are saved in your local machine in the run_example folder. Go ahead try this with different datasets and create different models and let me know your comments in the response section.

This article is in collaboration with



Original post:

Leave a Reply

Your email address will not be published. Required fields are marked *