Skip to content

NotHarshhaa/mlops-project-generator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

61 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

🧠 MLOps Project Generator

MLOps Project Generator Banner

Generate production-ready MLOps project templates β€” via Web UI or CLI.
Scikit-learn Β· PyTorch Β· TensorFlow Β· Multi-cloud Β· Zero setup required.

Stars PyPI License

This stack supports the full MLOps lifecycle:

Data β†’ Train β†’ Track β†’ Orchestrate β†’ Deploy β†’ Monitor β†’ Improve

πŸŽ‰ What's New in v2.0.0

πŸš€ Major Enterprise-Grade Enhancements:

  • πŸ”§ Advanced CLI Commands - clone, archive, check_deps, profile, migrate, doctor
  • πŸ“Š Enhanced Analytics System - AI-powered insights, trending analysis, benchmarking
  • βš™οΈ Advanced Configuration Management - Environment configs, templates, pipelines
  • ☁️ Production-Ready Cloud Deployment - Real AWS templates, CI/CD, monitoring
  • πŸ”„ Project Lifecycle Management - Smart cloning, migration, health checks
  • οΏ½ Security-First Approach - Vulnerability scanning, best practices, compliance

πŸ†• New CLI Commands:

mlops-project-generator clone <source> --name <target>
mlops-project-generator archive <project> --type zip
mlops-project-generator check_deps --update --security
mlops-project-generator profile --format json
mlops-project-generator migrate <old> <new-framework>
mlops-project-generator doctor --fix --deep

πŸš€ Features

πŸ—οΈ Core Generation

  • πŸ”§ Framework Support: Scikit-learn, PyTorch, TensorFlow/Keras
  • πŸ“Š Task Types: Classification, Regression, Time-Series, NLP, Computer Vision
  • 🎯 Stack Presets: 6 pre-configured MLOps stacks (Quick Start, Data Science, Deep Learning, Production MLOps, Enterprise, Research)
  • 🌐 Web UI: Browser-based generator β€” no install needed
  • πŸ€– CI/CD Ready: Non-interactive CLI mode for DevOps pipelines

πŸ”¬ MLOps Integration

  • πŸ“ˆ Experiment Tracking: MLflow, W&B, Custom solutions
  • 🎯 Orchestration: Airflow, Kubeflow
  • πŸš€ Deployment: FastAPI, Docker, Kubernetes, Cloud platforms
  • οΏ½ Monitoring: Evidently AI, Custom solutions
  • ☁️ Cloud Deployment: Multi-cloud templates (AWS, GCP, Azure)

πŸ› οΈ Advanced CLI Commands

  • πŸ“‹ clone: Smart project cloning with configuration preservation
  • πŸ“¦ archive: Selective project archiving (exclude data/models)
  • πŸ” check_deps: Dependency management with security vulnerability scanning
  • πŸ“Š profile: Performance profiling and resource usage analysis
  • πŸ”„ migrate: Framework migration with automated code conversion
  • 🩺 doctor: Comprehensive health checks with auto-fix capabilities

πŸ“ˆ Enhanced Analytics

  • πŸ“Š Trending Analysis: Framework usage, complexity trends, deployment patterns
  • πŸ€– AI-Powered Insights: Actionable recommendations based on project patterns
  • πŸ“ˆ Benchmarking: Compare projects against historical data
  • πŸ“Š Productivity Metrics: Projects per month, file/line generation statistics
  • πŸ“‹ Export Reports: Comprehensive analytics reports in JSON format

βš™οΈ Configuration Management

  • 🌍 Environment Configs: Development/staging/production configurations
  • πŸ“‹ Configuration Templates: Reusable templates for different use cases
  • πŸ”„ Configuration Pipelines: Multi-stage deployment configurations
  • πŸ” Diff & Merge: Configuration comparison and merging capabilities
  • πŸ’Ύ Backup & Restore: Configuration backup and restoration system

πŸš€ Production-Ready Deployment

  • 🐳 Real Dockerfiles: Multi-stage builds with security best practices
  • ☁️ AWS Templates: Production-grade CloudFormation, Terraform-ready
  • πŸ”„ CI/CD Integration: GitHub Actions with testing, security scanning, deployment
  • πŸ“Š Monitoring Setup: CloudWatch dashboards, alerting configurations
  • πŸ”’ Security Best Practices: IAM roles, VPC configuration, encryption

οΏ½ MLOps Presets

Choose from 6 pre-configured MLOps stacks tailored for different use cases:

Preset Framework Tracking Orchestration Deploy Monitor
⚑ Quick Start Sklearn None None FastAPI None
πŸ§ͺ Data Science Sklearn MLflow None FastAPI Custom
🧠 Deep Learning PyTorch W&B None Docker None
πŸ“‘ Production MLOps PyTorch MLflow Airflow Docker Evidently
🏒 Enterprise TensorFlow MLflow Kubeflow Kubernetes Evidently
πŸ”¬ Research PyTorch W&B None FastAPI None

Use presets via CLI: mlops-project-generator init --preset <name> or select them in the Web UI.


�🌐 Web UI (Recommended)

The fastest way to generate a project β€” open it in your browser, fill in the form, and download a ready-to-use ZIP.

Run locally

cd web_ui
npm install
npm run dev
# β†’ http://localhost:3000

Self-host / Deploy

The web UI is a Next.js 15 app with no external backend dependency. The generator runs entirely as Next.js API routes β€” deploy to Vercel, Netlify, Railway, or any Node.js host:

cd web_ui
npm run build
npm start

Vercel one-click deploy: set the root directory to web_ui and it works out of the box.

Web UI Tech Stack

Layer Technology
Framework Next.js 15 (App Router)
Styling Tailwind CSS v4 + Glassmorphism
Forms react-hook-form + zod
Generator Pure TypeScript (no Python runtime needed)
ZIP output archiver

πŸ“¦ CLI Installation

Prefer the command line? Install the Python package:

From PyPI

pip install mlops-project-generator==2.0.1

From Source

git clone https://github.com/NotHarshhaa/MLOps-Project-Generator.git
cd MLOps-Project-Generator
pip install -e .

Development Install

pip install -e ".[dev]"

🎯 CLI Quick Start

Interactive mode (recommended for beginners)

mlops-project-generator init

Using Stack Presets (NEW!)

# Quick start with preset
mlops-project-generator init --preset quick-start

# Enterprise stack with custom project name
mlops-project-generator init --preset enterprise --project-name my-platform

# Override preset values
mlops-project-generator init --preset production-mlops --deployment kubernetes

# List all available presets
mlops-project-generator list-presets

Non-interactive mode (CI/CD)

mlops-project-generator init \
  --framework pytorch \
  --task-type classification \
  --tracking mlflow \
  --orchestration airflow \
  --deployment docker \
  --monitoring evidently \
  --project-name enterprise-ml \
  --author-name "ML Team" \
  --description "Production ML pipeline"

Available CLI Commands

Core

Command Description
init Generate a new MLOps project
validate Validate an existing project structure
version Show version

Configuration Management

Command Description
save-preset <name> Save current config as a preset
list-presets List all presets
load-preset <name> Load a preset
delete-preset <name> Delete a preset

Template Management

Command Description
create-template <name> <framework> Create a custom template
list-templates List custom templates
delete-template <name> Delete a template
add-template-file <template> <path> Add a file to a template

Advanced CLI Commands (NEW!)

Command Description
clone <source> Clone existing projects with configuration preservation
archive <project> Project archiving with selective content inclusion
check_deps Dependency management with security vulnerability scanning
profile Performance profiling and resource usage analysis
migrate <old> <new> Framework migration with automated conversion
doctor Comprehensive project health check with auto-fix capabilities

Analytics & Insights (NEW!)

Command Description
stats Show generation statistics and trends
analyze <path> Analyze a generated project with AI insights
benchmark <project> Compare project against historical baselines
export-analytics Export comprehensive analytics reports

Configuration Management (ENHANCED!)

Command Description
save-preset <name> Save current config as a preset
list-presets List all presets
load-preset <name> Load a preset
delete-preset <name> Delete a preset
backup-config Backup all project configurations
restore-config <backup> Restore from configuration backup
diff-configs <config1> <config2> Compare two configurations
merge-configs <base> <other> Merge configuration files

init Flag Reference

Flag Short Values
--framework -f sklearn, pytorch, tensorflow
--task-type -t classification, regression, timeseries, nlp, computer-vision
--tracking -r mlflow, wandb, custom, none
--orchestration -o airflow, kubeflow, none
--deployment -d fastapi, docker, kubernetes
--monitoring -m evidently, custom, none
--project-name -p Any valid identifier
--author-name -a Any string
--description --desc Any string

🏒 Enterprise-Grade Features

οΏ½ Security & Compliance

  • Vulnerability Scanning: Automated security checks for dependencies
  • IAM Best Practices: Proper role-based access controls
  • VPC Configuration: Network isolation and security groups
  • Encryption: Data encryption at rest and in transit
  • Compliance Templates: SOC2, GDPR, HIPAA-ready configurations

πŸ“Š Production Monitoring

  • CloudWatch Integration: Real-time metrics and alerting
  • Dashboard Templates: Pre-built monitoring dashboards
  • Performance Profiling: Resource usage analysis and optimization
  • Health Checks: Comprehensive system validation with auto-fix
  • SLA Monitoring: Service level agreement tracking

πŸš€ Real-World CI/CD

  • GitHub Actions: Complete workflows with testing, security, deployment
  • Multi-Stage Dockerfiles: Optimized builds with security best practices
  • Automated Testing: Unit, integration, and end-to-end tests
  • Security Scanning: Code quality and vulnerability analysis
  • Rollback Strategies: Automated rollback capabilities

πŸ“ˆ Advanced Analytics

# Generate comprehensive analytics report
mlops-project-generator export-analytics --format json --output report.json

# Analyze project performance
mlops-project-generator profile --project my-ml-platform --format json

# Benchmark against historical data
mlops-project-generator benchmark my-project --baseline industry-standard

πŸ”„ Project Lifecycle Management

Smart Project Cloning

# Clone project with configuration preservation
mlops-project-generator clone existing-project --name new-project --exclude-data

Framework Migration

# Migrate from sklearn to pytorch
mlops-project-generator migrate sklearn-project pytorch --auto-convert

Dependency Management

# Check dependencies with security scanning
mlops-project-generator check_deps --update --security --fix

Project Health Checks

# Comprehensive health check with auto-fix
mlops-project-generator doctor --fix --deep --generate-report

πŸ–ΌοΈ Screenshots

CLI Commands

Scikit-learn Generation

Scikit-learn Generation

PyTorch Generation

PyTorch Generation

TensorFlow Generation

TensorFlow Generation


πŸ“ Generated Project Structure

your-project/
β”œβ”€β”€ src/
β”‚   β”œβ”€β”€ data/              # Data loading utilities
β”‚   β”œβ”€β”€ models/            # Model implementations
β”‚   β”œβ”€β”€ features/          # Feature engineering (sklearn)
β”‚   β”œβ”€β”€ utils/             # Training utilities (pytorch/tensorflow)
β”‚   β”œβ”€β”€ train.py           # Training entry point
β”‚   └── inference.py       # Inference / FastAPI server
β”œβ”€β”€ configs/
β”‚   └── config.yaml        # Project configuration
β”œβ”€β”€ data/
β”‚   β”œβ”€β”€ raw/
β”‚   β”œβ”€β”€ processed/
β”‚   └── external/
β”œβ”€β”€ models/
β”‚   β”œβ”€β”€ checkpoints/
β”‚   └── production/
β”œβ”€β”€ notebooks/
β”œβ”€β”€ tests/
β”‚   └── test_model.py
β”œβ”€β”€ cloud/                 # Cloud deployment files (if selected)
β”‚   └── <provider>/<service>/
β”‚       β”œβ”€β”€ Dockerfile
β”‚       β”œβ”€β”€ cloud-config.yaml
β”‚       └── deploy.sh
β”œβ”€β”€ requirements.txt
β”œβ”€β”€ Makefile
β”œβ”€β”€ .gitignore
β”œβ”€β”€ .env.example
β”œβ”€β”€ project_config.json
└── README.md

πŸ› οΈ Framework-Specific Features

Scikit-learn

  • RandomForest / Ridge with cross-validation and joblib serialization
  • DataLoader + FeatureEngineer classes ready to extend
  • FastAPI inference server included when --deployment fastapi

PyTorch

  • Configurable nn.Sequential model with Dropout
  • Full training loop with DataLoader, early stopping
  • torch.save / torch.load model persistence

TensorFlow / Keras

  • keras.Sequential with BatchNorm and Dropout
  • EarlyStopping callback pre-configured
  • model.save() / tf.keras.models.load_model() persistence

πŸ“Š Experiment Tracking

MLflow

mlflow.set_tracking_uri("http://localhost:5000")
with mlflow.start_run():
    mlflow.log_params(config["model"])
    mlflow.log_metrics({"accuracy": 0.95})

W&B

wandb.init(project="my-project")
wandb.log({"loss": 0.12, "accuracy": 0.95})
wandb.finish()

πŸš€ Deployment Options

FastAPI

uvicorn src.inference:app --reload
# β†’ http://localhost:8000/docs

Docker

docker build -t my-ml-project .
docker run -p 8000:8000 my-ml-project

Kubernetes

kubectl apply -f k8s/

πŸ“ˆ Monitoring

Evidently AI

from evidently.report import Report
from evidently.metric_preset import DataDriftPreset

report = Report(metrics=[DataDriftPreset()])
report.run(current_data=current, reference_data=reference)

πŸ€– CI/CD Integration

GitHub Actions

name: Generate ML Project
on:
  workflow_dispatch:
    inputs:
      framework:
        type: choice
        options: [sklearn, pytorch, tensorflow]
      project_name:
        type: string
        default: ml-project

jobs:
  generate:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: actions/setup-python@v4
        with:
          python-version: '3.11'
      - run: pip install mlops-project-generator
      - run: |
          mlops-project-generator init \
            --framework ${{ github.event.inputs.framework }} \
            --project-name ${{ github.event.inputs.project_name }} \
            --tracking mlflow \
            --deployment docker
      - uses: actions/upload-artifact@v3
        with:
          name: ${{ github.event.inputs.project_name }}
          path: ${{ github.event.inputs.project_name }}/

GitLab CI

generate_ml_project:
  image: python:3.11
  script:
    - pip install mlops-project-generator
    - mlops-project-generator init \
        --framework $FRAMEWORK \
        --project-name $PROJECT_NAME \
        --tracking mlflow \
        --deployment docker
  artifacts:
    paths: [$PROJECT_NAME/]
    expire_in: 1 week

πŸ—οΈ Repository Structure

MLOps-Project-Generator/
β”œβ”€β”€ generator/              # Python CLI source
β”‚   β”œβ”€β”€ cli.py             # Typer CLI entry point
β”‚   β”œβ”€β”€ renderer.py        # Jinja2 template renderer
β”‚   β”œβ”€β”€ validators.py      # Input validation
β”‚   β”œβ”€β”€ cloud_deployer.py  # Cloud template generation
β”‚   └── ...
β”œβ”€β”€ templates/              # Jinja2 project templates
β”‚   β”œβ”€β”€ common/            # Shared across all frameworks
β”‚   β”œβ”€β”€ sklearn/
β”‚   β”œβ”€β”€ pytorch/
β”‚   └── tensorflow/
β”œβ”€β”€ web_ui/                 # Next.js web application
β”‚   β”œβ”€β”€ app/
β”‚   β”‚   └── api/           # Next.js API routes (generator backend)
β”‚   β”‚       β”œβ”€β”€ generate/  # POST β€” start generation
β”‚   β”‚       β”œβ”€β”€ status/    # GET  β€” poll task status
β”‚   β”‚       β”œβ”€β”€ download/  # GET  β€” download ZIP
β”‚   β”‚       └── options/   # GET  β€” dropdown options
β”‚   └── src/
β”‚       └── lib/
β”‚           β”œβ”€β”€ generator/ # Pure TS generator (no Python needed)
β”‚           └── task-store.ts
β”œβ”€β”€ tests/                  # Python CLI tests
β”œβ”€β”€ pyproject.toml
└── README.md

πŸ§ͺ Testing (CLI)

pytest tests/ -v
pytest tests/ --cov=generator --cov-report=html

πŸ› οΈ Development (CLI)

git clone https://github.com/NotHarshhaa/MLOps-Project-Generator.git
cd MLOps-Project-Generator
pip install -e ".[dev]"
black generator/ tests/
isort generator/ tests/
flake8 generator/ tests/
mypy generator/

🀝 Contributing

Contributions are welcome! Please:

  1. Fork the repository
  2. Create a feature branch
  3. Add tests for new functionality
  4. Submit a pull request

πŸ“„ License

MIT β€” see LICENSE for details.


πŸ™ Acknowledgments

  • Typer Β· Beautiful Python CLI framework
  • Next.js Β· React framework powering the Web UI
  • Rich Β· Stunning terminal output
  • archiver Β· ZIP generation for project downloads

πŸ“ž Support


πŸ—ΊοΈ Roadmap

βœ… Completed

  • Python CLI with interactive + non-interactive modes
  • Scikit-learn, PyTorch, TensorFlow project templates
  • MLflow, W&B experiment tracking integration
  • Multi-cloud deployment templates (AWS, GCP, Azure)
  • Configuration presets and template customization
  • Project analytics and validation
  • Web UI β€” Next.js app with glassmorphism UI (v1.0.8)
  • Backend migration β€” generator ported to pure TypeScript, no Python runtime needed on the server (v1.0.8)
  • Stack Presets β€” 6 pre-configured MLOps stacks (Quick Start, Data Science, Deep Learning, Production MLOps, Enterprise, Research) (v1.0.8)
  • Advanced CLI Commands β€” clone, archive, check_deps, profile, migrate, doctor (v2.0.0)
  • Enhanced Analytics β€” AI-powered insights, trending analysis, benchmarking (v2.0.0)
  • Production-Ready Deployment β€” Real AWS templates, CI/CD, monitoring (v2.0.0)
  • Security-First Approach β€” Vulnerability scanning, best practices (v2.0.0)
  • Configuration Management β€” Environment configs, templates, pipelines (v2.0.0)

πŸš€ Upcoming

  • Additional frameworks (XGBoost, LightGBM, HuggingFace)
  • Shareable project config links
  • Template marketplace
  • Team collaboration features

⭐ If you find this useful, please give it a star on GitHub!

Generated with ❀️ by MLOps Project Generator

About

A CLI & UI tool that generates production-ready MLOps project templates for Scikit-learn, PyTorch, and TensorFlow.

Topics

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors