Skip to main content

ML Project Quickstart

Project description

๐Ÿ“– bukka: Django-Inspired ML Infrastructure CLI

bukka is a Python command-line interface (CLI) tool designed to dramatically reduce the boilerplate and setup time for new Machine Learning (ML) projects. Inspired by the structure and speed of the Django framework's startproject command, bukka lets you instantly scaffold a robust, standardized, and ready-to-use project infrastructure.


โœจ Features

  • Django-Inspired Structure: Creates a logical, maintainable folder hierarchy optimized for ML workflows (data, models, notebooks, scripts).
  • Automated Environment Setup: Automatically generates a Python virtual environment (.venv) to isolate your project dependencies.
  • Dependency Management: Creates a starting requirements.txt file with essential ML packages (e.g., NumPy, Pandas, Scikit-learn).
  • YAML Configuration: Use configuration files for complex project setups with init-config command.
  • Multiple Backends (Coming Soon!): Support for various dataframe backends via narwhals (polars~~, pandas, modin, cudf, dask, pyarrow~~).
  • Problem Type Detection: Automatic ML problem identification or explicit specification (classification, regression, clustering).
  • Intelligent Pipeline Generation: Automatically generates ML pipelines based on dataset analysis.
  • CLI Simplicity: Use simple, intuitive commands with subcommands to create a complete project skeleton in seconds.

๐Ÿš€ Quick Start

1. Installation

bukka is available on PyPI.

pip install bukka

2. Creating a New Project

Use the bukka run command with your desired project name and dataset.

# Example: Create a new project named 'titanic'
python -m bukka run --name titanic --dataset titanic.csv --target Survived

Or use the shorthand options:

python -m bukka run -n titanic -d titanic.csv -t Survived

3. Using Configuration Files

For complex projects, create a YAML configuration template:

# Generate a config template
python -m bukka init-config

# Edit bukka_config.yaml with your settings, then run:
python -m bukka run --config bukka_config.yaml

4. Advanced Options

# Specify backend and problem type
python -m bukka run -n my_project -d data.csv -t label \
  --backend pandas --problem-type regression

# Custom train/test split
python -m bukka run -n my_project -d data.csv -t target --train-size 0.7

# Skip virtual environment creation (makes command substantially faster)
python -m bukka run -n my_project -d data.csv --skip-venv

This command will:

  1. Create the project folder: titanic/
  2. Create and configure a virtual environment: titanic/.venv/
  3. Generate the initial dependency file: titanic/requirements.txt
  4. Install the packages in the requirements.txt
  5. Copy the data file to your data folder
  6. Split the dataset into training and test sets
  7. Analyze your dataset and generate pipelines based on detected problems
  8. Provide placeholder utility classes you can customize
  9. Provide starter notebooks, so you can get to machine learning ASAP

(Coming soon):

  1. Initialize MLFlow to track your parameters and results
  2. Provide baseline models for comparison (e.g., random guessing)

๐ŸŒณ Standard Project Structure

When you run python -m bukka run --name <name>, the following standardized structure is created, ensuring consistency across all your ML projects:

<project_name>/
โ”œโ”€โ”€ .venv/                         # Isolated Python Virtual Environment
โ”œโ”€โ”€ data/                          # Storage for raw, processed, and external data
โ”‚   โ”œโ”€โ”€ <dataset_name>             # Original dataset copy
โ”‚   โ”œโ”€โ”€ test/                      # Test split data
โ”‚   โ””โ”€โ”€ train/                     # Training split data
โ”œโ”€โ”€ pipelines/                     # ML Pipelines
โ”‚   โ”œโ”€โ”€ __init__.py                # Makes 'pipelines' a Python package
โ”‚   โ”œโ”€โ”€ baseline/                  # Baseline pipelines (e.g. naive classifiers, currently empty)
โ”‚   โ”œโ”€โ”€ candidate/                 # Your custom pipelines
โ”‚   โ””โ”€โ”€ generated/                 # Auto-generated pipelines from dataset analysis
โ”œโ”€โ”€ notebooks/                     # Jupyter notebooks for experimentation
โ”‚   โ””โ”€โ”€ starter_notebook.ipynb     # Pre-configured notebook to get started
โ”œโ”€โ”€ utils/                         # Custom utility classes and functions
โ”œโ”€โ”€ pyproject.toml                 # Project metadata and dependencies
โ””โ”€โ”€ requirements.txt               # Dependency list for pip

๐Ÿ“‹ CLI Commands

Available Commands

python -m bukka --help                    # Show all available commands
python -m bukka init-config --help        # Help for config template generation
python -m bukka run --help                # Help for project creation

Create Configuration Template

python -m bukka init-config                         # Creates bukka_config.yaml
python -m bukka init-config --output my_config.yaml # Custom output path

Create Project

Basic Usage:

python -m bukka run --name PROJECT_NAME --dataset DATA.csv --target TARGET_COLUMN

Configuration File:

python -m bukka run --config bukka_config.yaml

Advanced Options:

Option Short Description Default
--name -n Project name/directory Required*
--dataset -d Path to dataset file Optional
--target -t Target column name Optional
--config -c YAML config file path None
--backend -b Dataframe backend polars
--problem-type -p ML problem type auto
--train-size Train/test split ratio 0.8
--skip-venv -sv Skip venv creation False
--stratify Enable stratified split True
--no-stratify Disable stratified split -
--strata Stratification columns None

* Required unless using --config

Supported Backends:

  • polars (default)
  • More coming soon!

Problem Types:

  • auto (default - automatic detection)
  • binary_classification
  • multiclass_classification
  • regression
  • clustering

๐Ÿ“š Documentation

Full documentation is available on Read the Docs:

To build the documentation locally:

cd docs
pip install -r requirements.txt
make html

The generated documentation will be in docs/build/html/.


๐ŸŽถ About the Name

The library is named after Bukka White, a country blues guitarist who recorded from the late 30s and 40s, before being rediscovered in the 60s. One of my favorites by him is Fixin' to Die Blues. Country blues guitarists use their technical skill with the guitar to back their singing to create a very complete sound, using their thumb to play rhythm and their fingers to play a melody and harmonize over that giving it the sound of multiple guitarists.

The choice to name the library after a guitarist is inspired, like much of the rest of this project, by the library Django, named for Django Reinhardt, another phenomenal guitarist.


๐Ÿค Contributing

We welcome contributions! If you have suggestions for new structural templates, essential starter packages, or commands, please open an issue or submit a pull request.


๐Ÿ“„ License

This project is licensed under the Apache License. See the LICENSE file for details.

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

bukka-0.0.6.tar.gz (64.8 kB view details)

Uploaded Source

Built Distribution

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

bukka-0.0.6-py3-none-any.whl (71.9 kB view details)

Uploaded Python 3

File details

Details for the file bukka-0.0.6.tar.gz.

File metadata

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

File hashes

Hashes for bukka-0.0.6.tar.gz
Algorithm Hash digest
SHA256 905f37c9503c632385a399d65f43ca3435bcb9e72b3d1907eccec301d5dba970
MD5 8622341c51b8b42fd34bf1064dc58071
BLAKE2b-256 8ca2291e90d6aa43243808cc846296ab742af0d30b0ce39c67fa104a481b0b6b

See more details on using hashes here.

Provenance

The following attestation bundles were made for bukka-0.0.6.tar.gz:

Publisher: python-publish.yml on pjachim/Bukka

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

File details

Details for the file bukka-0.0.6-py3-none-any.whl.

File metadata

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

File hashes

Hashes for bukka-0.0.6-py3-none-any.whl
Algorithm Hash digest
SHA256 457a7cff97bba6a2faaf1a40aab3028d6139a609c0c61b745c467d7d780bdf5e
MD5 b4924ebac7a3347b6152f7cf1428c2b0
BLAKE2b-256 d2a7613923821cd7db875b2f67866291894cece3d5ab5cd802c08540b7cd5c1e

See more details on using hashes here.

Provenance

The following attestation bundles were made for bukka-0.0.6-py3-none-any.whl:

Publisher: python-publish.yml on pjachim/Bukka

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