ML Zoomcamp 2023 – Deploying Machine Learning Models– Part 7

Deployment to the cloud: AWS Elastic Beanstalk This article covers the deployment of the Docker container to the cloud. In the previous article we built a Docker image, build the container, put our churn prediction service there and also the model. Then we build this image and learn how to run it locally. Now weContinue reading “ML Zoomcamp 2023 – Deploying Machine Learning Models– Part 7”

ML Zoomcamp 2023 – Deploying Machine Learning Models– Part 6

Environment management: Docker Why do we need Docker? Docker is a powerful tool that addresses many challenges in modern software development and deployment. It allows us to isolate entire applications from the rest of the system’s processes and dependencies, providing a level of encapsulation and portability that is invaluable in today’s computing landscape. One ofContinue reading “ML Zoomcamp 2023 – Deploying Machine Learning Models– Part 6”

ML Zoomcamp 2023 – Deploying Machine Learning Models– Part 5

Python virtual environment: Pipenv Dependency and environment management When you run ‘pip install scikit-learn,’ it searches in the directories listed in the $PATH variable, such as ~/anaconda3/bin/ in this case. Inside this folder, you have ‘pip,’ ‘python,’ and other packages. The ‘pip’ from this folder is used, and it connects to the Python Package IndexContinue reading “ML Zoomcamp 2023 – Deploying Machine Learning Models– Part 5”

ML Zoomcamp 2023 – Deploying Machine Learning Models– Part 4

Serving the churn model with Flask Now we want to serve the churn model with Flask. Wrapping the predict script into a Flask app First, we need to convert all the code from Jupyter Notebook into .py scripts. The following snippet displays the code for “train.py”. The prediction section is separated from the training partContinue reading “ML Zoomcamp 2023 – Deploying Machine Learning Models– Part 4”

ML Zoomcamp 2023 – Deploying Machine Learning Models– Part 3

Introduction to Flask A web service is a method for communicating between two devices over a network. So let’s say we have our web service and a user who wants to make a request. So the user sends the request with some information. The request has some parameters, then the user gets back result withContinue reading “ML Zoomcamp 2023 – Deploying Machine Learning Models– Part 3”

ML Zoomcamp 2023 – Deploying Machine Learning Models– Part 2

Saving and loading the model Let’s take a moment to recap what we’ve accomplished so far. Before we can save a model, the crucial first step is training it. I’ve extensively covered model training in previous articles, where we explored various techniques, including K-Fold cross-validation. Below, I’ve included all the code necessary for model training.Continue reading “ML Zoomcamp 2023 – Deploying Machine Learning Models– Part 2”

ML Zoomcamp 2023 – Deploying Machine Learning Models– Part 1

Overview In this chapter, we will delve into the deployment process of our machine learning model. We’ll start by taking the Jupyter notebook where our model resides and save it to a file, which we’ll call ‘model.bin.’ The next step is to load this model from a different process, a web service aptly named theContinue reading “ML Zoomcamp 2023 – Deploying Machine Learning Models– Part 1”