Skip to main content

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

Project description

๐Ÿง  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.0

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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mlops_project_generator-2.0.1.tar.gz (120.5 kB view details)

Uploaded Source

File details

Details for the file mlops_project_generator-2.0.1.tar.gz.

File metadata

  • Download URL: mlops_project_generator-2.0.1.tar.gz
  • Upload date:
  • Size: 120.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.9

File hashes

Hashes for mlops_project_generator-2.0.1.tar.gz
Algorithm Hash digest
SHA256 ad4a473e812cb70eb422240cf612a1e4b3f1fa1592ba20bf27cf84a4dbbd3699
MD5 6748617261c8137ff8caeae4a44bea95
BLAKE2b-256 75ae1a0b9effac17b3ca4539f872d58496c930ec01900d762d8750810c76593d

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page