📝 MLOps Classifier Comment 📌 Giới thiệu
Đây là dự án triển khai End-to-End MLOps pipeline cho bài toán phân loại bình luận (Comment Classification). Ứng dụng giúp huấn luyện, đánh giá và triển khai mô hình phân loại bình luận với quy trình tự động hóa, có thể mở rộng và giám sát dễ dàng.
Thu thập & tiền xử lý dữ liệu văn bản.
Huấn luyện và so sánh nhiều mô hình (RandomFores, v.v).
Quản lý thí nghiệm bằng MLflow/DVC.
CI/CD với GitHub Actions + AWS EC2.
Triển khai mô hình với Flask + Docker.
Theo dõi & giám sát bằng MLflow.
Yêu cầu
Python >= 3.10
pip hoặc conda
Docker (khuyến nghị cho triển khai)
Git + DVC (nếu muốn versioning dữ liệu)
AWS EC2 server AWS S3 lưu trữ kết quả model training
sử dụng MLflow giám sát log metric parammert, so sánh kết quả Chọn model tốt nhất --> Register qua các version Pipline Training with DVC
Metrics và logs được lưu với MLflow.
Có thể tích hợp Prometheus + Grafana để giám sát môi trường production.
#with specific access
-
EC2 access : It is virtual machine
-
ECR: Elastic Container registry to save your docker image in aws
-
Build docker image of the source code
-
Push your docker image to ECR
-
Launch Your EC2
-
Pull Your image from ECR in EC2
-
Lauch your docker image in EC2
#Policy:
-
AmazonEC2ContainerRegistryFullAccess
-
AmazonEC2FullAccess
#optinal
sudo apt-get update -y
sudo apt-get upgrade
#required
curl -fsSL https://get.docker.com -o get-docker.sh
sudo sh get-docker.sh
sudo usermod -aG docker ubuntu
newgrp docker
AWS_ACCESS_KEY_ID=
AWS_SECRET_ACCESS_KEY=
AWS_REGION = us-east-1
AWS_ECR_LOGIN_URI = demo>> 566373416292.dkr.ecr.ap-south-1.amazonaws.com
ECR_REPOSITORY_NAME = simple-app