Skip to main content

ML Project Generator

PyPI version Python versions License

A CLI tool for quickly scaffolding machine learning projects

Python 3.10+ · Typer · MIT License

Русский · English

ML Project Generator creates a ready-to-use ML project skeleton with directories for data, models, and notebooks, basic Python files, a .gitignore, and a list of dependencies. Start with a general-purpose template or choose a structure designed for Scikit-learn or PyTorch.

Features

  • three templates: basic, sklearn, and pytorch;
  • automatic creation of directories and files;
  • automatic requirements.txt generation;
  • optional Jupyter dependency with --jupyter;
  • optional Matplotlib and Seaborn dependencies with --plotting;
  • dedicated README and .gitignore files for generated projects.

Requirements

You need:

  • Python 3.10 or newer;
  • pip;
  • Git, only when installing by cloning the repository.

Check your Python version:

python --version

Installation

Install the latest release from PyPI:

pip install ml-project-scaffold

The ml-init command is then available from any directory:

ml-init --help

Installation from source

Quick installation on Windows

Clone the repository and run the installer:

git clone https://github.com/KishlakEnjoyer/ml-project-generator.git
cd ml-project-generator
.\install.bat

The installer will automatically:

  • verify that Python 3.10+ is available;
  • install pipx;
  • add the CLI application directory to PATH;
  • install the ml-init command.

Close and reopen your terminal after installation. You can then run ml-init from any directory:

ml-init --help

Run install.bat again to update the installed command from your current local copy of the repository.

Manual installation for development

An editable installation is more convenient when changing the source code. Create a virtual environment:

python -m venv .venv

Activate it.

Windows PowerShell:

.venv\Scripts\Activate.ps1

Linux and macOS:

source .venv/bin/activate

Install the tool:

python -m pip install -e .

The ml-init command is now available in the active environment.

Quick start

Create a basic ML project:

ml-init my-project

Create a Scikit-learn project:

ml-init churn-prediction sklearn

Create a PyTorch project with Jupyter and plotting libraries:

ml-init image-classifier pytorch --jupyter --plotting

The project is created in the current directory. For example, the last command creates an image-classifier directory.

Usage

ml-init NAME [TEMPLATE] [OPTIONS]

Arguments

Argument Description Default
NAME Name and directory of the new project required
TEMPLATE Template: basic, sklearn, or pytorch basic

Options

Option Short form Description
--jupyter -j Add jupyter to the project dependencies
--plotting -p Add matplotlib and seaborn
--version -v Display the tool version
--help Display command help

Display the built-in help:

ml-init --help

Templates

basic

A minimal, general-purpose structure for experiments and small ML projects. It contains data, models, notebooks, src, and tests directories.

ml-init experiment basic

sklearn

A structure for classical machine learning projects. It includes separate files for data loading, preprocessing, training, evaluation, and prediction.

ml-init tabular-model sklearn

Main dependencies: NumPy, Pandas, Scikit-learn, and Joblib.

pytorch

A structure for deep learning projects. It includes files for the Dataset, model, training, evaluation, and inference, along with checkpoints and outputs directories.

ml-init neural-network pytorch

Main dependencies: PyTorch, NumPy, and tqdm.

After generating a project

Enter the generated directory:

cd my-project

Create a separate virtual environment:

python -m venv .venv

Activate it on Windows PowerShell:

.venv\Scripts\Activate.ps1

Or on Linux and macOS:

source .venv/bin/activate

Install the generated project dependencies:

python -m pip install -r requirements.txt

You can now place source datasets in data/raw, experiments in notebooks, and reusable application code in src.

Example generated structure

my-project/
├── data/
│   ├── raw/
│   └── processed/
├── models/ or checkpoints/
├── notebooks/
├── src/
├── tests/
├── .gitignore
├── README.md
└── requirements.txt

The exact set of files depends on the selected template.

Development

Install the project in editable mode together with Pytest:

python -m pip install -e . pytest

Run the test suite:

pytest

Preset files are located in src/mlproject/presets. Each template defines three values:

  • DEPENDENCIES — dependencies for the generated project;
  • DIRECTORIES — directories to create;
  • FILES — files to create and their contents.

License

This project is distributed under the MIT License.

Download files

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

Source Distribution

ml_project_scaffold-0.1.2.tar.gz (10.3 kB view details)

Uploaded Source

Built Distribution

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

ml_project_scaffold-0.1.2-py3-none-any.whl (9.0 kB view details)

Uploaded Python 3

File details

Details for the file ml_project_scaffold-0.1.2.tar.gz.

File metadata

  • Download URL: ml_project_scaffold-0.1.2.tar.gz
  • Upload date:
  • Size: 10.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.14.2

File hashes

Hashes for ml_project_scaffold-0.1.2.tar.gz
Algorithm Hash digest
SHA256 cc2064e6d3149a72c1d2391a9f283b4691cd9bdb3fd2dc1c3ec865b781b4c2bd
MD5 85834ff4e046d23f16f293517050d111
BLAKE2b-256 1014bac02bfa90cb9d437f646a1a5b4ebd4323ae9536685f455f47b555ae024c

See more details on using hashes here.

File details

Details for the file ml_project_scaffold-0.1.2-py3-none-any.whl.

File metadata

File hashes

Hashes for ml_project_scaffold-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 da1f3bdeb3e26bea0ed1b820e30891a5724bb0a6a97af2d189b8913342c913f7
MD5 5edcff7a9e7e68bbdf4d31eb6fdc6358
BLAKE2b-256 3076cc419c010282db36e98616634cc41655916fefe50e60e5d46c0f4f85ec75

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.1.2 This release

2 files

0.1.1

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page