A CLI tool that generates production-ready MLOps project templates for Scikit-learn, PyTorch, and TensorFlow
Project description
๐ง MLOps Project Generator
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
Scikit-learn Project Generation
PyTorch 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
- Fork the repository
- Create a feature branch
- Make your changes
- Add tests for new functionality
- Run the test suite
- 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
- ๐ง Email: contact@example.com
- ๐ Issues: GitHub Issues
- ๐ฌ Discussions: GitHub Discussions
๐ฎ 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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
732115f3a681125a5ae1c0079341453dbd8f6bb4f4b2311831d65af72bc92292
|
|
| MD5 |
02673b427b4a7a756e9ffc505cb4ae89
|
|
| BLAKE2b-256 |
fd32fdefd162e151b3deb72cdf78184497a4f1dcfad6a24470396f63f79642be
|
File details
Details for the file mlops_project_generator-1.0.2-py3-none-any.whl.
File metadata
- Download URL: mlops_project_generator-1.0.2-py3-none-any.whl
- Upload date:
- Size: 18.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a45c88b28e4a9e3d99b291f41a30b5aa61d3e7e40eb1fa148cbe5fa890f49341
|
|
| MD5 |
1912f9a65795ed53d07b2a8337631133
|
|
| BLAKE2b-256 |
1e304dbc90504a377949762266a986541af3ec882dd859e744e6f2d8078f1d10
|