This project demonstrates an advanced MLOps workflow using Snowflake, a cloud-based data warehousing service known not only for its data storage capabilities but also for its extensive support for machine learning operations (MLOps). Snowflake provides robust solutions for managing TB-scale datasets efficiently, allowing for data science experiments and model deployment directly from its environment. The focus here is on integrating Snowflake with modern DevOps tools like Docker and GitHub Actions to automate the lifecycle of machine learning models.
The main objective of this project is to streamline the process of machine learning model development, training, and deployment using Snowflake. It tackles several challenges:
- Scalability Issues: Handling large datasets efficiently without manual intervention.
- Operational Complexity: Simplifying the process of model updates and deployments.
- Integration Overhead: Seamlessly integrating various tools needed for a robust MLOps pipeline.
By using Snowflake, we can reduce operational overhead, scale dynamically based on demand, and improve the efficiency of data transformations and model training.
- ETL Simplicity: Automated ETL processes for cleansing and transforming large datasets.
- Integrated Machine Learning: Use of Snowflake's capabilities to execute machine learning models directly within the data warehouse.
- Continuous Deployment: Implementation of CI/CD pipelines with GitHub Actions for ongoing integration and deployment of machine learning models.
- Docker Integration: Containerization of the environment to ensure consistency across different stages of development and deployment.
The project is divided into several components, each addressing a part of the MLOps workflow:
- Data Handling and Model Training in Snowflake: Using stored procedures and user-defined functions (UDFs) to manage data and train models directly in Snowflake.
- Automation with GitHub Actions: Setting up continuous integration and deployment pipelines to automate the testing, building, and deployment of machine learning models.
- Deployment Using Docker: Packaging the trained models into Docker containers to ensure that the deployment environment is consistent and isolated.
.
├── .github
│ └── workflows
│ └── githubAction.yml # Defines the CI/CD pipeline for automating model training and deployment
├── Notebooks
│ ├── 1_load_data.ipynb # Jupyter notebook for data loading
│ ├── feature_engineering.ipynb # Notebook for processing and transforming data
│ └── train_save_model.ipynb # Notebook for model training and serialization
├── dataset
│ └── advertising.csv # Sample dataset used for model training
├── Dockerfile # Dockerfile for building the model serving container
├── docker-compose.yml # Docker Compose file to orchestrate the container deployment
├── environment.yml # Conda environment file for setting up the Python environment
├── main.py # Python script for starting the model server
├── requirements.txt # List of Python packages required
├── .gitignore # Specifies files to ignore in git
├── LICENSE # License file
└── README.md # The README file