Ce projet propose une solution industrielle pour la classification automatique de tickets de support IT. À partir d'un historique de 62 609 emails, le pipeline transforme le texte en représentations sémantiques pour prédire le type de ticket (Incident, Request, Problem, Change).
L'accent est mis sur la robustesse du pipeline (Docker, Kubernetes) et la surveillance continue (Evidently AI, Prometheus, Grafana).
- Technologies
- Fonctionnalités du Pipeline
- Structure du Projet
- Installation et Lancement
- Monitoring & Observabilité
- Déploiement Kubernetes (Minikube)
- Auteur
- Core: Python
- Data Analysis: Pandas, Matplotlib, Seaborn
- NLP : Hugging Face (
paraphrase-multilingual-MiniLM-L12-v2), NLTK. - Machine Learning : Scikit-Learn (Logistic Regression ).
- Base de données : ChromaDB (Vector Database).
- Monitoring ML : Evidently AI (Data Drift & Classification Performance).
- Monitoring Infra : Prometheus, Grafana, cAdvisor, Node Exporter.
- Conteneurisation : Docker, Docker Compose.
- NLP Prep: Fusion
subject+body, nettoyage (stopwords, ponctuation, normalisation). - Semantic Embedding: Transformation du texte en vecteurs via le modèle Hugging Face
paraphrase-multilingual-MiniLM-L12-v2. - Vector Storage: Indexation dans ChromaDB avec gestion par lots (batching) pour garantir la montée en charge (62k+ documents).
- Multi-Model Training: Comparaison automatique entre Logistic Regression et SVM (LinearSVC) avec sauvegarde du meilleur modèle (Best Model Registry).
- ML Monitoring: Analyse du Data Drift et des performances de classification avec Evidently AI.
- Infra Monitoring: Surveillance en temps réel du CPU/RAM via Prometheus, Grafana, cAdvisor et Node Exporter.
NLP-ticker-Classifier/
├── src/ # Code source du pipeline
│ ├── embedding_service.py # Vectorisation & Ingestion ChromaDB
│ ├── train_eval.py # Entraînement et comparaison de modèles
│ └── monitoring.py # Génération des rapports Evidently AI
├── data/ # Volumes de données
│ └── data_prepared.csv # Dataset nettoyé
├── infrastructure/ # Configurations DevOps
│ ├── k8s/ # Manifests Kubernetes
│ └── monitoring/ # Config Prometheus & Grafana
├── artifacts/ # Sorties du pipeline
│ ├── models/ # Modèles entraînés (.joblib)
│ └── reports/ # Rapports de monitoring (HTML)
├── notebooks/ # Analyse exploratoire (EDA)
├── config.py # Configuration centralisée (Paths, Hosts)
├── .env.example
├── requierements.txt
├── Dockerfile # Image du pipeline
└── docker-compose.yml # Orchestration de la stack complète
Python 3.10+
- Docker & Docker Compose
- Un token Hugging Face (à placer dans un fichier
.env)
# Clone the repository
git clone https://github.com/khadija199904/NLP-ticker-Classifier.git
cd NLP-ticker-Classifier
### 2. Démarrage de la Stack
```bash
docker compose up -d --buildLe conteneur nlp_app est configuré en mode passif (tail -f /dev/null) pour vous laisser piloter le pipeline manuellement.
docker compose exec nlp_app python /app/src/main.pyLes rapports de performance montrent une Accuracy de ~77%. Le rapport interactif est disponible après exécution du monitoring :
# Pour visualiser le rapport (serveur local sur port 8001)
google-chrome ~/Desktop/Your-Project/NLP-ticker-Classifier/artifacts/reports/monitoring_report.html| Outil | URL | Utilisation |
|---|---|---|
| Grafana | http://localhost:3000 |
Dashboards 14282 (Docker) & 1860 (Host) |
| Prometheus | http://localhost:9090 |
Consultation des métriques brutes |
| cAdvisor | http://localhost:8085 |
Stats temps réel des containers |
Le projet supporte le déploiement sous forme de Job Kubernetes pour les exécutions batch en production.
- Appliquer le stockage :
kubectl apply -f infrastructure/k8s/storage.yaml - Lancer ChromaDB :
kubectl apply -f infrastructure/k8s/chromadb-deployment.yaml - Exécuter le pipeline :
kubectl apply -f infrastructure/k8s/nlp-job.yaml
Khadija Elabbioui - Data Scientist / AI Developer / ML Engineer