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

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

This stack supports the full MLOps lifecycle:

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

๐Ÿš€ Features

  • ๐Ÿ”ง Framework Support: Scikit-learn, PyTorch, TensorFlow/Keras
  • ๐Ÿ“Š Task Types: Classification, Regression, Time-Series
  • ๐Ÿ”ฌ Experiment Tracking: MLflow, W&B
  • ๐ŸŽฏ Orchestration: Airflow, Kubeflow
  • ๐Ÿš€ Deployment: FastAPI, Docker, Kubernetes
  • ๐Ÿ“ˆ Monitoring: Evidently AI, Custom solutions
  • ๐Ÿ› ๏ธ Production-Ready: CI/CD, monitoring, best practices by default

๐ŸŒŸ NEW: Advanced Features

๐Ÿ” Smart System Validation

  • Automatic system check for Python, Git, Docker, Conda
  • Real-time status indicators (โœ…/โŒ) with visual feedback
  • System information display (OS, Python version, architecture)
  • Early validation to prevent setup issues

๐Ÿง  Intelligent Project Generation

  • Smart project naming based on framework and task type
  • Framework comparison table with complexity indicators
  • Project size estimation (files, lines of code, storage)
  • Impact analysis for each configuration choice

๐Ÿ“Š Enhanced User Experience

  • Beautiful progress indicators with real-time updates
  • Interactive framework recommendations with use cases
  • Comprehensive project summary before generation
  • Step-by-step next steps after project creation

๐Ÿ”ง Advanced Template Features

  • Dynamic .gitignore generation based on tools selected
  • Framework-specific patterns (PyTorch: *.pth, TensorFlow: *.pb)
  • Tool-specific configurations (MLflow, W&B, Airflow, Kubeflow)
  • Comprehensive MLOps artifact management

๐Ÿ“ฆ Installation

From Source

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

Using pip (when published)

pip install mlops-project-generator

๐Ÿ–ผ๏ธ Screenshots

CLI Commands

CLI Version and Help Commands

Scikit-learn Project Generation

Scikit-learn Project Generation

PyTorch Project Generation

PyTorch Project Generation

TensorFlow Project Generation

TensorFlow Project Generation

๐ŸŽฏ Quick Start

Generate a New Project

mlops-project-generator init

This will launch an enhanced interactive CLI that guides you through:

๐Ÿ” Step 1: System Validation

  • Automatic system check for required tools
  • Visual status indicators (โœ…/โŒ)
  • System information display
  • Early problem detection

๐Ÿ”ง Step 2: Framework Selection

  • Interactive comparison table with use cases
  • Complexity indicators (Low/Medium/High)
  • Smart recommendations based on your needs
  • Framework guidance for better decisions

๐Ÿ“Š Step 3: Configuration

  • Task type selection (Classification/Regression/Time-Series)
  • Experiment tracking (MLflow/W&B/Custom)
  • Orchestration (Airflow/Kubeflow/None)
  • Deployment (FastAPI/Docker/Kubernetes)
  • Monitoring (Evidently/Custom/None)

๐Ÿง  Step 4: Smart Project Setup

  • Intelligent project naming suggestions
  • Directory validation to prevent conflicts
  • Project size estimation (files, lines, storage)
  • Impact analysis of your choices

๐Ÿ“‹ Step 5: Enhanced Summary

  • Comprehensive project overview
  • Next steps preview before generation
  • Real-time progress tracking
  • Step-by-step guidance after creation

๐ŸŽฏ Step 6: Ready-to-Go Project

  • Framework-specific code ready to run
  • Production-ready structure
  • Comprehensive documentation
  • Next steps checklist

Example Usage

# Generate a Scikit-learn classification project with MLflow tracking
mlops-project-generator init

# Follow the prompts:
# โœ” ML Framework: Scikit-learn
# โœ” Task Type: Classification
# โœ” Experiment Tracking: MLflow
# โœ” Orchestration: None
# โœ” Deployment: FastAPI
# โœ” Monitoring: Evidently
# โœ” Project Name: ml-classification-project
# โœ” Author Name: Your Name

๐Ÿ“ Generated Project Structure

your-project/
โ”œโ”€โ”€ data/                   # Data files
โ”‚   โ”œโ”€โ”€ raw/               # Raw data
โ”‚   โ”œโ”€โ”€ processed/         # Processed data
โ”‚   โ””โ”€โ”€ external/          # External data
โ”œโ”€โ”€ models/                 # Model files
โ”‚   โ”œโ”€โ”€ checkpoints/       # Model checkpoints
โ”‚   โ””โ”€โ”€ production/        # Production models
โ”œโ”€โ”€ notebooks/              # Jupyter notebooks
โ”œโ”€โ”€ scripts/                # Utility scripts
โ”œโ”€โ”€ src/                    # Source code
โ”‚   โ”œโ”€โ”€ data/              # Data loading utilities
โ”‚   โ”œโ”€โ”€ models/            # Model implementations
โ”‚   โ”œโ”€โ”€ features/          # Feature engineering (sklearn)
โ”‚   โ””โ”€โ”€ utils/             # Training utilities (pytorch/tensorflow)
โ”œโ”€โ”€ configs/                # Configuration files
โ”œโ”€โ”€ tests/                  # Test files
โ”œโ”€โ”€ requirements.txt        # Dependencies
โ”œโ”€โ”€ pyproject.toml         # Project configuration
โ”œโ”€โ”€ Makefile               # Build commands
โ”œโ”€โ”€ .gitignore             # Git ignore rules
โ””โ”€โ”€ README.md              # Project documentation

๐Ÿ› ๏ธ Framework-Specific Features

Scikit-learn Projects

  • Models: RandomForest, LogisticRegression, SVM, etc.
  • Feature Engineering: Scaling, selection, PCA
  • Evaluation: Cross-validation, comprehensive metrics
  • Deployment: Joblib serialization, FastAPI integration

PyTorch Projects

  • Models: Neural networks with residual connections, attention mechanisms
  • Training: Advanced optimizers, learning rate schedulers, early stopping
  • Utilities: Gradient clipping, data augmentation, model profiling
  • Deployment: TorchScript, FastAPI integration

TensorFlow Projects

  • Models: Keras models with batch normalization, attention mechanisms
  • Training: Callbacks, custom loss functions, gradient clipping
  • Utilities: Model profiling, data augmentation, custom schedulers
  • Deployment: SavedModel format, FastAPI integration

๐Ÿ“Š Experiment Tracking Integration

MLflow Integration

# Automatically logged metrics
mlflow.log_metrics({
    "train_loss": 0.123,
    "val_accuracy": 0.95,
    "learning_rate": 0.001
})

# Model artifacts
mlflow.log_artifact("models/production/model.joblib")

W&B Integration

# Automatic logging with W&B callback
wandb.init(project="my-project")
wandb.log({"loss": 0.123, "accuracy": 0.95})

๐Ÿš€ Deployment Options

FastAPI Deployment

# Start the API server
uvicorn src.inference:app --reload

# API documentation at http://localhost:8000/docs

Docker Deployment

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

Kubernetes Deployment

# Deploy to Kubernetes
kubectl apply -f k8s/

๐Ÿ“ˆ Monitoring Solutions

Evidently AI Integration

# Data drift monitoring
from evidently.report import Report
from evidently.metric_preset import DataDriftPreset

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

Custom Monitoring

# Custom monitoring implementation
class ModelMonitor:
    def check_performance(self, predictions, ground_truth):
        # Custom performance checks
        pass

๐Ÿงช Testing

# Run tests
pytest tests/ -v

# Run with coverage
pytest tests/ --cov=src --cov-report=html

๐Ÿ› ๏ธ Development

Setup Development Environment

# Clone repository
git clone https://github.com/NotHarshhaa/MLOps-Project-Generator.git
cd MLOps-Project-Generator

# Install in development mode
pip install -e ".[dev]"

# Run tests
pytest tests/

# Run linting
black generator/ tests/
isort generator/ tests/
flake8 generator/ tests/
mypy generator/

Project Structure

mlops-project-generator/
โ”œโ”€โ”€ generator/              # CLI tool source code
โ”‚   โ”œโ”€โ”€ cli.py             # Main CLI interface
โ”‚   โ”œโ”€โ”€ prompts.py         # Interactive prompts
โ”‚   โ”œโ”€โ”€ renderer.py        # Template rendering
โ”‚   โ””โ”€โ”€ validators.py      # Input validation
โ”œโ”€โ”€ templates/              # Project templates
โ”‚   โ”œโ”€โ”€ common/            # Common files across frameworks
โ”‚   โ”œโ”€โ”€ sklearn/           # Scikit-learn specific templates
โ”‚   โ”œโ”€โ”€ pytorch/           # PyTorch specific templates
โ”‚   โ””โ”€โ”€ tensorflow/        # TensorFlow specific templates
โ”œโ”€โ”€ tests/                  # Test files
โ”œโ”€โ”€ docs/                   # Documentation
โ”œโ”€โ”€ pyproject.toml         # Project configuration
โ””โ”€โ”€ README.md              # This file

๐Ÿ”ง Configuration

The generated projects use YAML configuration files:

# configs/config.yaml
project:
  name: "my-project"
  author: "Your Name"
  version: "0.1.0"

model:
  type: "RandomForestClassifier"
  n_estimators: 100
  max_depth: 10

training:
  batch_size: 32
  learning_rate: 0.001
  epochs: 100

experiment_tracking:
  tool: "mlflow"
  tracking_uri: "http://localhost:5000"

deployment:
  method: "fastapi"
  host: "0.0.0.0"
  port: 8000

๐Ÿค Contributing

We welcome contributions! Please see our Contributing Guide for details.

Development Workflow

  1. Fork the repository
  2. Create a feature branch
  3. Make your changes
  4. Add tests for new functionality
  5. Run the test suite
  6. Submit a pull request

๐Ÿ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.

๐Ÿ™ Acknowledgments

  • Typer - For the beautiful CLI interface
  • Jinja2 - For powerful template rendering
  • Rich - For stunning terminal output
  • Cookiecutter - For project template inspiration

๐Ÿ“ž Support

๐Ÿ”ฎ Roadmap

  • v1.1: Additional frameworks (XGBoost, LightGBM)
  • v1.2: Cloud deployment templates (AWS, GCP, Azure)
  • v1.3: Advanced monitoring solutions
  • v2.0: GUI interface for project generation
  • v2.1: Template marketplace

โญ If you find this tool helpful, please give us 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-1.0.0.tar.gz (64.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

mlops_project_generator-1.0.0-py3-none-any.whl (19.4 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: mlops_project_generator-1.0.0.tar.gz
  • Upload date:
  • Size: 64.6 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-1.0.0.tar.gz
Algorithm Hash digest
SHA256 bdde926cdacac8f87e56fee843f2993e045d1cd5c19dc5f9bc2bd6ae568d4ec6
MD5 c275934afba73b614dfea17c7778fcd5
BLAKE2b-256 2d663f11308843c58508b60be4754caa0284e247649a12f46b26640986a6b986

See more details on using hashes here.

File details

Details for the file mlops_project_generator-1.0.0-py3-none-any.whl.

File metadata

File hashes

Hashes for mlops_project_generator-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 c62fab5c7e7fe2ad0abb3a30641a9e5b54f66339027e1c36f30819fe4d07edae
MD5 0a362bb688002b2b91a792654f3e3a1f
BLAKE2b-256 73fb1524ecc4876246f71df2d2c78998882df1b65ddf4afa7f43a5fbe57736f6

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