{"id":27399628,"url":"https://github.com/ridenefiras/qosmlops","last_synced_at":"2026-04-11T19:34:20.431Z","repository":{"id":277968016,"uuid":"933905789","full_name":"RideneFiras/QosMLOPS","owner":"RideneFiras","description":null,"archived":false,"fork":false,"pushed_at":"2025-04-11T19:32:11.000Z","size":17351,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-11T20:32:43.201Z","etag":null,"topics":["5g-networks","ai","data-science","docker","elasticsearch","explainable-ai","explainable-ai-shap","fastapi","gpt-4","mlflow","mlops","mlops-project","python","qos-prediction","shap","sklearn"],"latest_commit_sha":null,"homepage":"https://qos-mlops.vercel.app","language":"HTML","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/RideneFiras.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-02-16T23:59:31.000Z","updated_at":"2025-04-11T19:32:16.000Z","dependencies_parsed_at":null,"dependency_job_id":"f3af5cb3-7d36-447e-a91d-d3572848e9b0","html_url":"https://github.com/RideneFiras/QosMLOPS","commit_stats":null,"previous_names":["ridenefiras/qosmlops"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RideneFiras%2FQosMLOPS","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RideneFiras%2FQosMLOPS/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RideneFiras%2FQosMLOPS/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RideneFiras%2FQosMLOPS/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/RideneFiras","download_url":"https://codeload.github.com/RideneFiras/QosMLOPS/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248813981,"owners_count":21165656,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["5g-networks","ai","data-science","docker","elasticsearch","explainable-ai","explainable-ai-shap","fastapi","gpt-4","mlflow","mlops","mlops-project","python","qos-prediction","shap","sklearn"],"created_at":"2025-04-14T03:20:07.395Z","updated_at":"2025-12-30T23:05:05.162Z","avatar_url":"https://github.com/RideneFiras.png","language":"HTML","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Throughput Prediction in 5G Networks\r\n\r\n![Demo Screenshot](assets/gif.gif)\r\n\r\n[![FastAPI](https://img.shields.io/badge/backend-FastAPI-green?logo=fastapi)](https://fastapi.tiangolo.com/)\r\n[![Dockerized](https://img.shields.io/badge/deployment-Docker-blue?logo=docker)](https://www.docker.com/)\r\n[![MLflow](https://img.shields.io/badge/MLflow-integrated-purple?logo=mlflow)](https://mlflow.org/)\r\n[![PostgreSQL](https://img.shields.io/badge/database-PostgreSQL-blue?logo=postgresql)](https://www.postgresql.org/)\r\n[![Made with Python](https://img.shields.io/badge/Made%20with-Python-yellow?logo=python)](https://www.python.org/)\r\n\r\n---\r\nThis repository includes all core functionalities along with a beta dashboard for testing and development purposes.\r\nFor a more lightweight and production-ready frontend, check out the enhanced version here:\r\n\r\n[SpeedSense Front](https://github.com/RideneFiras/SpeedSense_Front)\r\n---\r\n## 📡 Project Overview\r\n\r\n\r\n\r\nThis project predicts network throughput — a key indicator of Quality of Service (QoS) in 5G networks — using machine learning. It features a full MLOps pipeline with **MLflow tracking**, **Elasticsearch-based evaluation dashboards**, **SHAP explainability**, and **GPT-powered QoS insights**. The system runs on a fully Dockerized stack using **FastAPI** and a simple web frontend for real-time use.\r\n\r\n---\r\n\r\nThis work was developed as part of the **Integrated Project** at [Esprit School of Engineering](https://esprit.tn/), under the guidance of professors **Rahma Bouraoui**, **Safa Cherif**, and **Zaineb Labidi**.\r\n\r\n\r\n---\r\n\r\n## ✨ Features\r\n\r\n### Frontend\r\n- Upload CSV to get QoS predictions\r\n- GPT-powered explanations with SHAP insights\r\n- Caching avoids repeated GPT API calls\r\n- Export results as PDF\r\n\r\n### Backend\r\n- FastAPI for predictions, explainability, and GPT summaries\r\n- Uses SHAP values to explain model decisions\r\n- GPT-4o via GitHub API creates human-readable reports\r\n- PostgreSQL stores predictions \u0026 insights\r\n\r\n### MLOps Pipeline\r\n- Data preprocessing, model training, evaluation\r\n- **MLflow** logs parameters, metrics, and artifacts\r\n- **Elasticsearch** logs evaluation metrics for monitoring dashboards\r\n- Simple CLI via `Makefile` commands\r\n\r\n🖼️ Kibana Evaluation Dashboard:\r\n\r\n![Evaluation Dashboard](assets/elastic_eva.png)\r\n\r\n---\r\n\r\n## 🗂️ Project Structure\r\n\r\n```\r\n├── static/                 # Frontend HTML + JS\r\n├── services/               # SHAP explainability + GPT interpretation logic\r\n├── Dataset/                # Training and test data (CSV)\r\n├── Models/                 # Saved models and processed data\r\n├── assets/                 # Visuals (e.g. Elastic dashboard screenshots)\r\n├── testinput/              # Example input for testing predictions\r\n├── app.py                  # FastAPI server\r\n├── main.py                 # MLOps training \u0026 evaluation pipeline\r\n├── model_pipeline.py       # Sklearn training, preprocessing, evaluation\r\n├── csvv.py                 # CSV parsing logic\r\n├── docker-compose.yml      # Orchestrates app + DB + Elasticsearch + MLflow\r\n├── Dockerfile              # Container for FastAPI + logic\r\n├── Makefile                # CLI commands for training, evaluation, etc.\r\n├── requirements.txt        # Python dependencies\r\n├── .env.example            # Example environment variable file\r\n├── .flake8 / .pre-commit/  # Code quality configuration\r\n├── README.md               # Project overview and instructions\r\n```\r\n\r\n---\r\n\r\n## ⚙️ Setup\r\n\r\n```bash\r\n# Clone repo\r\ngit clone https://github.com/RideneFiras/QosMLOPS.git\r\ncd QosMLOPS\r\n\r\n# Create and activate a virtual environment (recommended)\r\npython -m venv qos\r\nsource qos/bin/activate\r\n\r\n# Install Python dependencies\r\npip install -r requirements.txt\r\n\r\n# Train model and prepare everything\r\nmake all\r\n\r\n# Start FastAPI and web UI\r\nmake fastapi\r\n\r\n# Or launch entire stack with Docker\r\ndocker-compose up --build\r\n```\r\n\r\n---\r\n\r\n## 🧠 GPT Insight System\r\n\r\nAfter the model predicts throughput:\r\n- SHAP explains feature impact per prediction\r\n- GPT-4o turns SHAP values into a readable QoS summary\r\n- Insights include:\r\n  - Overall QoS rating (e.g. Very Low → Very Good)\r\n  - Top influencing features\r\n  - Suggestions to improve performance\r\n- Markdown is rendered cleanly in-browser\r\n- Export as PDF with a single click\r\n\r\n---\r\n\r\n## 🧪 Usage Guide\r\n\r\n- Visit [http://127.0.0.1:8000](http://127.0.0.1:8000)\r\n- Upload your test CSV\r\n- Click “Explain” next to any result\r\n- Read GPT-powered QoS explanation\r\n- Save report as PDF if needed\r\n\r\n---\r\n\r\n## 🔑 Environment Variables\r\n\r\nStore these in a `.env` file (not tracked by git):\r\n\r\n- `DATABASE_URL` — PostgreSQL connection string  \r\n- `GITHUB_TOKEN` — GitHub token for GPT API access  \r\n- `IS_DOCKER` — Set to `true` inside containers (used for routing)\r\n\r\n---\r\n\r\n## 🔧 Makefile Commands\r\n\r\n## 🔧 Makefile Commands\r\n\r\n```bash\r\nmake all          # Run full pipeline: prepare → train → evaluate → predict\r\nmake train        # Train the ML model and log to MLflow\r\nmake evaluate     # Evaluate performance and send metrics to MLflow \u0026 Elastic\r\nmake fastapi      # Start FastAPI locally (with database in background)\r\nmake services-up  # Start Elasticsearch, Kibana, PostgreSQL, and MLflow (Docker)\r\nmake docker-run   # Run the entire app in Docker (FastAPI + dependencies)\r\nmake docker-down  # Stop all running Docker containers\r\nmake notebook     # Launch Jupyter Notebook\r\nmake check        # Run both code formatting (Black) and linting (Flake8)\r\nmake clean        # Remove cache, .pkl files, and logs\r\n```\r\n\r\n\r\n---\r\n\r\n## ⚙️ Tech Stack\r\n\r\n- **Python** \u0026 **Scikit-learn**\r\n- **FastAPI** + **SHAP** + **GPT-4o**\r\n- **MLflow** for model tracking\r\n- **Elasticsearch + Kibana** for evaluation dashboards\r\n- **PostgreSQL** for storing prediction results\r\n- **Tailwind CSS** for styling\r\n- **Docker** for deployment\r\n\r\n---\r\n\r\n## ✅ Notes\r\n\r\nThis is an end-to-end, real-world MLOps project combining AI explainability, model monitoring, and GPT summarization. Designed with clarity, reliability, and user insights in mind — ready for production.\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fridenefiras%2Fqosmlops","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fridenefiras%2Fqosmlops","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fridenefiras%2Fqosmlops/lists"}