A scaffolding library and CLI for quickly spinning up ML projects with all the good stuff already configured.
mhpy (MykytaHordiaPY) is a project scaffolder that sets up a complete ML project structure with:
- Hydra for config management
- W&B for experiment tracking
- DVC for data versioning
- pre-commit hooks for code quality
- pytest for testing
- Common ML utilities (PyTorch helpers, metrics, plotting, etc.)
Basically, it saves you from copy-pasting the same boilerplate across projects.
pip:
pip install git+https://github.com/mykytahordia/mhpy.gituv:
uv tool install git+https://github.com/mykytahordia/mhpy.gitpip install "mhpy[ml] @ git+https://github.com/mykytahordia/mhpy.git"pip install "mhpy[dev] @ git+https://github.com/mykytahordia/mhpy.git"pip install "mhpy[all] @ git+https://github.com/mykytahordia/mhpy.git"If you want to try it youself:
git clone https://github.com/mykytahordia/mhpy.git
cd mhpy
pip install uv # if you don't have it
uv sync --all-extrasInstall changes with:
uv run pip install -e ".[all]"
# or
make reinstallRun in debug mode:
mhpy command=init_no_prompts command.package_name=mlproj command.debug=trueClean test directory:
find . -mindepth 1 -delete # Be careful!mhpy command.package_name=myprojThis will scaffold a complete project with:
- Git repo initialized
- Virtual environment with
uv - Project structure (
src/,tests/,notebooks/,data/, etc.) - Hydra configs
- DVC setup
- pre-commit hooks
- Makefile with common commands
- All dependencies installed
After running, just:
source .venv/bin/activate
wandb login # if you use W&B- Python ≥3.12
uvpackage manager
Check the LICENSE file in the repo.