Skip to main content

Production-ready ML project scaffolder

Project description

mlinit ๐Ÿš€

PyPI version License: MIT Code Style: Black

The production-ready scaffolder for Machine Learning projects.

mlinit is a CLI tool designed to bootstrap Machine Learning projects with industry-standard best practices. It goes beyond simple directory creation by setting up a complete development environment with Poetry, Hydra, Git, and CI/CD out of the box.


๐Ÿ’ก Why mlinit?

There are many scaffolders out there. Here is why mlinit is different:

Feature Cookiecutter Kedro mlinit
Philosophy Generic templating engine Full-fledged framework Lightweight scaffolder + Modern Stack
Config Static JSON Custom ConfigLoader Hydra (Composable & Dynamic)
Deps requirements.txt usually pip-tools Poetry (Native Integration)
Learning Curve Low High Low (It's just a folder structure)

mlinit gives you the structure of a framework without forcing you to learn a new API. It sets up the tools you already love (Hydra, Poetry, PyTorch) so you can just write code.

โœจ Features

  • ๐Ÿ— Production-Grade Structure: Generates a robust directory layout optimized for reproducibility (separating data, source, configs, and artifacts).
  • ๐Ÿ Modern Dependency Management: Automatically initializes Poetry projects, solving dependency hell before it starts.
  • โš™๏ธ Hydra Configuration: Pre-configured Hydra setup for flexible, composable experiment configuration.
  • ๐Ÿ’พ Smart Presets: Built-in configurations for Computer Vision, NLP, and General ML. Save your own custom setups for future use.
  • โœ… CI/CD Ready: Auto-generates GitHub Actions workflows to run your tests on every push.
  • ๐Ÿ”ง Git Integration: Initializes a Git repository with a smart .gitignore tailored for ML (ignoring large data/artifacts).
  • ๐Ÿ“„ Auto-Documentation: Generates README.md files in every subdirectory explaining exactly what should go where.

๐Ÿ“ฆ Installation

You can install mlinit directly from PyPI:

pip install mlinit

Tip: If the mlinit command is not found after installation, run it via python:

python -m mlinit.cli init --name my_project

๐Ÿš€ Quick Start

Initialize a new project in seconds:

mlinit init --name my_awesome_project

Example Output

The tool generates a ready-to-run train.py integrated with Hydra:

# src/train.py
import hydra
from omegaconf import DictConfig, OmegaConf

@hydra.main(version_base=None, config_path="../conf", config_name="config")
def train(cfg: DictConfig):
    print(OmegaConf.to_yaml(cfg))
    # Your training logic here...

๐Ÿ›ฃ๏ธ Roadmap

  • MLflow Integration: Auto-configure MLflow for experiment tracking.
  • DVC Setup: Automated data version control hooks.
  • Cloud Deployment: Terraform templates for AWS/GCP.
  • Streamlit/Gradio: One-click demo app generation.

๐Ÿ“‚ The "mlinit" Standard Structure

Your generated project will look like this:

my_project/
โ”œโ”€โ”€ conf/                   # Hydra configuration files
โ”‚   โ”œโ”€โ”€ base/               # Base configs (train.yaml, model.yaml)
โ”‚   โ””โ”€โ”€ config.yaml         # Main entry point
โ”œโ”€โ”€ data/                   # Data directory (gitignored content)
โ”‚   โ”œโ”€โ”€ raw/                # Immutable raw data
โ”‚   โ”œโ”€โ”€ processed/          # Canonical data sets for modeling
โ”‚   โ””โ”€โ”€ external/           # Data from third party sources
โ”œโ”€โ”€ src/                    # Source code
โ”‚   โ”œโ”€โ”€ data/               # Scripts to generate data
โ”‚   โ”œโ”€โ”€ models/             # Model architectures
โ”‚   โ”œโ”€โ”€ utils/              # Helper functions
โ”‚   โ””โ”€โ”€ train.py            # Main training script (Hydra-enabled)
โ”œโ”€โ”€ notebooks/              # Jupyter notebooks for exploration
โ”œโ”€โ”€ tests/                  # Unit tests
โ”œโ”€โ”€ artifacts/              # Model checkpoints, logs, outputs (gitignored)
โ”œโ”€โ”€ .github/workflows/      # CI/CD pipelines (GitHub Actions)
โ”œโ”€โ”€ pyproject.toml          # Project dependencies (Poetry)
โ”œโ”€โ”€ README.md               # Project documentation
โ””โ”€โ”€ .gitignore              # Git ignore rules

๐Ÿ™ Acknowledgements

This project was heavily inspired by Cookiecutter and the Cookiecutter Data Science project. We aim to bring that same spirit of community-driven standardization to the modern ML stack (Hydra, Poetry, etc.).

We believe in the power of the open-source community to build better tools together. If you have ideas or feedback, please open an issue!

๐Ÿค Contributing

We welcome contributions! Please see CONTRIBUTING.md for setup instructions.

  1. Fork the repository.
  2. Create a feature branch.
  3. Submit a Pull Request.

Built with โค๏ธ for the ML Community.

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

mlinit_cli-0.1.1.tar.gz (10.8 kB view details)

Uploaded Source

Built Distribution

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

mlinit_cli-0.1.1-py3-none-any.whl (10.2 kB view details)

Uploaded Python 3

File details

Details for the file mlinit_cli-0.1.1.tar.gz.

File metadata

  • Download URL: mlinit_cli-0.1.1.tar.gz
  • Upload date:
  • Size: 10.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for mlinit_cli-0.1.1.tar.gz
Algorithm Hash digest
SHA256 b543417d98be891bdb66422a10d40091859211c90a8c49ac1aef25762768b473
MD5 ca162fef7acbdf4ef35db87cd95fc065
BLAKE2b-256 1a53e2a6c07ffc7eabd715b409c69e78241059bc63a4fb0d9788b5f28621351d

See more details on using hashes here.

Provenance

The following attestation bundles were made for mlinit_cli-0.1.1.tar.gz:

Publisher: workflow.yml on mohits-code/mlinit

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file mlinit_cli-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: mlinit_cli-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 10.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for mlinit_cli-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 d771f62ae8451070068b3ca0fb58404224c74a93729b7ec470ca143360363a8e
MD5 7698d9be811a6d6fd36b1ef6dc096b98
BLAKE2b-256 c814e207a15c2863a729a749c417bbd9f7ea8ea59586ca8584aa6ef383cc8d1f

See more details on using hashes here.

Provenance

The following attestation bundles were made for mlinit_cli-0.1.1-py3-none-any.whl:

Publisher: workflow.yml on mohits-code/mlinit

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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