Skip to main content

ML Project Generator

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

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.1.tar.gz (9.8 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.1-py3-none-any.whl (8.9 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: ml_project_scaffold-0.1.1.tar.gz
  • Upload date:
  • Size: 9.8 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.1.tar.gz
Algorithm Hash digest
SHA256 82506b7470e95163cd4edb5032d797f1794e39b403cabd5638ce956fb48b84c3
MD5 656302cf94293d08a61dd25653fbbfaa
BLAKE2b-256 5a2701fac1991a851da44aa8dc2ebd99487783399395469e29d034a7042bb6c5

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ml_project_scaffold-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 630a600ff67f102e3021512b2093dcd37648eff917dd6cdd6b336c7e199706bf
MD5 b177a7091a39eb3f75f62acc709ea082
BLAKE2b-256 f086d23a9ab7ae36c557a3a2e670686f93fa16c1f8ede7f7e64234acd14d18c8

See more details on using hashes here.

Release history Release notifications | RSS feed

0.1.2

2 files

This release

0.1.1 This release

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