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.txtfile with essential ML packages (e.g., NumPy, Pandas, Scikit-learn). - YAML Configuration: Use configuration files for complex project setups with
init-configcommand. - 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:
- Create the project folder:
titanic/ - Create and configure a virtual environment:
titanic/.venv/ - Generate the initial dependency file:
titanic/requirements.txt - Install the packages in the requirements.txt
- Copy the data file to your data folder
- Split the dataset into training and test sets
- Analyze your dataset and generate pipelines based on detected problems
- Provide placeholder utility classes you can customize
- Provide starter notebooks, so you can get to machine learning ASAP
(Coming soon):
- Initialize MLFlow to track your parameters and results
- 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_classificationmulticlass_classificationregressionclustering
๐ Documentation
Full documentation is available on Read the Docs:
- Getting Started: Installation and first steps
- Usage Examples: Comprehensive examples for common tasks
- API Reference: Detailed API documentation
- Configuration: Guide to YAML configuration files
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
905f37c9503c632385a399d65f43ca3435bcb9e72b3d1907eccec301d5dba970
|
|
| MD5 |
8622341c51b8b42fd34bf1064dc58071
|
|
| BLAKE2b-256 |
8ca2291e90d6aa43243808cc846296ab742af0d30b0ce39c67fa104a481b0b6b
|
Provenance
The following attestation bundles were made for bukka-0.0.6.tar.gz:
Publisher:
python-publish.yml on pjachim/Bukka
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
bukka-0.0.6.tar.gz -
Subject digest:
905f37c9503c632385a399d65f43ca3435bcb9e72b3d1907eccec301d5dba970 - Sigstore transparency entry: 898879174
- Sigstore integration time:
-
Permalink:
pjachim/Bukka@184ea8e4f6bf0457e38ed18be0435d02c7a0bfcd -
Branch / Tag:
refs/heads/main - Owner: https://github.com/pjachim
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@184ea8e4f6bf0457e38ed18be0435d02c7a0bfcd -
Trigger Event:
push
-
Statement type:
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
457a7cff97bba6a2faaf1a40aab3028d6139a609c0c61b745c467d7d780bdf5e
|
|
| MD5 |
b4924ebac7a3347b6152f7cf1428c2b0
|
|
| BLAKE2b-256 |
d2a7613923821cd7db875b2f67866291894cece3d5ab5cd802c08540b7cd5c1e
|
Provenance
The following attestation bundles were made for bukka-0.0.6-py3-none-any.whl:
Publisher:
python-publish.yml on pjachim/Bukka
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
bukka-0.0.6-py3-none-any.whl -
Subject digest:
457a7cff97bba6a2faaf1a40aab3028d6139a609c0c61b745c467d7d780bdf5e - Sigstore transparency entry: 898879228
- Sigstore integration time:
-
Permalink:
pjachim/Bukka@184ea8e4f6bf0457e38ed18be0435d02c7a0bfcd -
Branch / Tag:
refs/heads/main - Owner: https://github.com/pjachim
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@184ea8e4f6bf0457e38ed18be0435d02c7a0bfcd -
Trigger Event:
push
-
Statement type: