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 PyPI (Recommended)

pip install mlops-project-generator

From Source

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

Development Installation

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

๐Ÿ–ผ๏ธ 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.2.tar.gz (62.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.2-py3-none-any.whl (18.8 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: mlops_project_generator-1.0.2.tar.gz
  • Upload date:
  • Size: 62.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for mlops_project_generator-1.0.2.tar.gz
Algorithm Hash digest
SHA256 732115f3a681125a5ae1c0079341453dbd8f6bb4f4b2311831d65af72bc92292
MD5 02673b427b4a7a756e9ffc505cb4ae89
BLAKE2b-256 fd32fdefd162e151b3deb72cdf78184497a4f1dcfad6a24470396f63f79642be

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for mlops_project_generator-1.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 a45c88b28e4a9e3d99b291f41a30b5aa61d3e7e40eb1fa148cbe5fa890f49341
MD5 1912f9a65795ed53d07b2a8337631133
BLAKE2b-256 1e304dbc90504a377949762266a986541af3ec882dd859e744e6f2d8078f1d10

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