Skip to content

A production-ready Network Security System built with Python that leverages Machine Learning for threat detection and analysis.

Notifications You must be signed in to change notification settings

anusha-chebolu/E2E-MLOps-ETL-NetworkSecuritySystem

Repository files navigation

Network Security System with MLOps Pipeline

A comprehensive end-to-end MLOps project that implements a Network Security System using machine learning for threat detection and analysis. This project demonstrates professional-grade software engineering practices, MLOps principles, and cloud integration.

🚀 Features

  • End-to-End MLOps Pipeline: Complete workflow from data ingestion to model deployment
  • Automated ML Pipeline: Automated data validation, transformation, and model training
  • Cloud Integration: Ready for cloud deployment with infrastructure-as-code support
  • MLflow Integration: Model tracking and experiment management
  • RESTful API: FastAPI-based API for model inference and training
  • Modular Architecture: Well-structured, maintainable codebase following best practices

🛠️ Technologies Used

  • Python 3.x
  • FastAPI
  • Scikit-learn
  • MLflow
  • DAGsHub
  • AWS
  • Docker
  • Git

📊 Project Dashboard

CI/CD Pipeline

CI/CD Pipeline Successful deployment pipeline with continuous integration, delivery, and deployment stages

Model Performance Tracking

MLflow Dashboard Model tracking in MLflow showing excellent performance metrics (F1: 0.968, Precision: 0.965, Recall: 0.972)

GitHub Integration

DagsHub Repository Project repository with MLOps experiment tracking

Cloud Deployment

AWS ECR Docker images stored in Amazon Elastic Container Registry

AWS S3 Artifact and model storage in Amazon S3

📁 Project Structure

networksecurity/
├── cloud/           # Cloud infrastructure and deployment configs
├── components/      # Core ML pipeline components
├── constant/        # Configuration constants
├── entity/         # Data models and entities
├── exception/      # Custom exception handling
├── logging/        # Logging configuration
├── pipeline/       # ETL and ML workflows
└── utils/          # Utility functions and helpers

🏗️ Architecture

The project follows a modular architecture with clear separation of concerns:

  • Data Ingestion: Handles data collection and preprocessing
  • Data Validation: Ensures data quality and consistency
  • Data Transformation: Feature engineering and data preparation
  • Model Training: Automated model training with hyperparameter tuning
  • Model Evaluation: Comprehensive model evaluation metrics
  • API Layer: RESTful endpoints for model inference

🚀 Getting Started

Local Setup

  1. Clone the repository:
git clone https://github.com/yourusername/NetworkSecuritySystem.git
cd NetworkSecuritySystem
  1. Install dependencies:
pip install -r requirements.txt
  1. Set up environment variables:
cp .env.example .env
# Edit .env with your configuration
  1. Run the application:
uvicorn app:app --reload

AWS EC2 Deployment

  1. Connect to your EC2 instance using SSH

  2. Update the system packages:

sudo apt-get update -y
sudo apt-get upgrade -y
  1. Install Docker:
curl -fsSL https://get.docker.com -o get-docker.sh
sudo sh get-docker.sh
  1. Add your user to the Docker group:
sudo usermod -aG docker ubuntu
newgrp docker
  1. Clone and set up the project:
git clone https://github.com/yourusername/NetworkSecuritySystem.git
cd NetworkSecuritySystem
  1. Build and run with Docker:
docker build -t networksecurity .
docker run -d -p 8000:8000 networksecurity

📊 API Endpoints

  • GET /: Health check endpoint
  • POST /train: Trigger model training pipeline
  • POST /predict: Get predictions from the trained model

📈 Model Performance

Our model achieves excellent performance metrics:

  • F1 Score: 0.968
  • Precision: 0.965
  • Recall: 0.972

🔒 Security Features

  • Network traffic analysis
  • Anomaly detection
  • Threat classification
  • Real-time monitoring capabilities

👤 Author

Anusha Chebolu

About

A production-ready Network Security System built with Python that leverages Machine Learning for threat detection and analysis.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published