This project is designed to demonstrate the use of MLOps practices in building and deploying machine learning models. The project focuses on predicting penguin species based on their physical characteristics using the Palmer Penguins dataset.
This project is designed to demonstrate the use of MLOps practices in building and deploying machine learning models. The project focuses on predicting penguin species based on their physical characteristics using the Palmer Penguins dataset. |
For cost reasons, the project hosted on GitHub is completely local. However, there is an online version hosted on HuggingFace. This version does not use a database, MLflow, or backend server (API). It only includes the front end using a single Dockerfile, with models hosted within the same repository. It uses pre-cleaned and processed data that is also within the same repository, which can be visited at the following URL:
https://huggingface.co/spaces/jdalfonso/penguins
To know how to use API let's check.
https://github.com/jdalfons/penguins_mlops_project/tree/main/server/README.md
To set up the project, you will need to use Docker Compose. Docker Compose allows you to define and manage multi-container Docker applications. Follow the steps below to get started:
-
Clone the repository:
git clone https://github.com/yourusername/penguin_mlops_project.git cd penguin_mlops_project
-
Build and start the containers: Use Docker Compose to build and start the containers. Run the following command:
docker-compose up --build -d
This command will build 4 Docker images and start the containers in detached mode.
MLflow is used to manage the machine learning lifecycle, including experimentation, reproducibility, and model deployment in this case is just to create models and make experimentation about this. Ensure that the environment variables are correctly set in the .env
file to allow MLflow to function properly.
Create a .env
file in the mlflow directory and set the necessary environment variables. These variables are crucial for running MLflow. An example .env
file might look like this:
```env
MLOPS_TRACKING_URI="http://localhost:5001"
PENGUINS_API_URL="http://localhost:8000/all_data"
```
Once the containers are up and running, you can access the MLflow UI by navigating to http://localhost:5000
in your web browser.
Tool | Version |
---|---|
Docker | Latest |
Python | 3.11 |
MLflow | 2.19.0 |
Streamlit | 1.40.1 |
FastAPI | 0.115.5 |
By following the steps above, you will have a fully functional MLOps environment for developing and deploying machine learning models. Make sure to properly configure your environment variables to ensure smooth operation of MLflow and other services.
Happy coding!