How luyerjcpro/deploiement_mlops works
This repository implements an employee-attrition prediction service: employee records are stored in PostgreSQL, an API retrieves them and serves predictions from a serialized classifier, and results are persisted for later production evaluation. The main runtime path and training pipeline are supported by source excerpts. The README is empty, and the data-loading and preprocessing modules were not excerpted, so their roles and links are shown only where source-index references support them; the production evaluation script documents its database query directly.
Main entry points: main.py FastAPI routes · pipeline.py Training pipeline · evaluer_production.py Production evaluation · connexion_db.py Database sessions
Components 15
Data and training
- Trained model
models/modele.joblib - Training pipeline
models/pipeline.py - Feature engineering
data/feature_engineering.py - Raw data loading
data/load_clean_data.py - Feature data loading
data/load_clean_fe_data.py
Prediction service
- FastAPI routes
api/main.py - Employee schemas
api/schemas.py - API key check
api/security.py
Persistence
- Database sessions
database/connexion_db.py - Employees
database/models_tables.py - Predictions
database/models_tables.py
Production evaluation
- Production evaluation
src/evaluer_production.py - Validation data
Other components
- API client
- PostgreSQL
Connections 15
- API client → FastAPI routes: requests
api/main.py - FastAPI routes → API key check: checks key
api/main.py - FastAPI routes → Employee schemas: validates profile
api/main.py - FastAPI routes → Database sessions: gets session
api/main.py - FastAPI routes → Employees: reads employee
api/main.py - FastAPI routes → Trained model: loads model
api/main.py - FastAPI routes → Predictions: writes result
api/main.py - Training pipeline → Feature engineering: references features
- Training pipeline → Trained model: serializes model
models/pipeline.py - Raw data loading → Feature data loading: prepares features
- Database sessions → PostgreSQL: connects
database/connexion_db.py - Employees → PostgreSQL: stores employees
- Predictions → PostgreSQL: stores predictions
- Production evaluation → PostgreSQL: queries predictions
src/evaluer_production.py - Production evaluation → Validation data: reads truth
src/evaluer_production.py