Skip to main content

Baya – Modular ML Orchestration Framework for structured machine learning workflows.

Project description

Baya

Baya is a structured, production-ready Machine Learning orchestration and AutoML framework designed for clear, reproducible, and extensible ML workflows.

It supports both:

  • Minimal one-line training
  • Fully modular ML pipelines
  • AutoML with leaderboard tracking
  • Exporting results to multiple formats

Why Baya?

  • Multiple abstraction layers (simple → advanced)
  • Built-in AutoML engine
  • DAG-based orchestration
  • Experiment tracking
  • Model registry
  • CLI interface
  • Export system (CSV, JSON, Excel, PDF, DOCX, PNG, etc.)
  • Fully compatible with Pandas workflows
  • Extensible and modular architecture

Installation

pip install bayaml

Runtime dependencies installed automatically:

  • pandas
  • numpy
  • scikit-learn
  • scipy
  • pyyaml
  • matplotlib

Works With Pandas

Baya integrates directly with Pandas. You can freely mix Pandas + Baya:

import pandas as pd
from baya import quick_train

df = pd.read_csv("data.csv")

# Use pandas normally
df["new_feature"] = df["feature"] * 2

# Pass directly into Baya
metrics = quick_train(
    data=df,
    target="Target",
    model="linear_regression"
)

print(metrics)

You can:

  • preprocess with pandas
  • clean manually
  • engineer features
  • then hand over to Baya

No restrictions.

API Layers

Baya supports three levels of control.

1️⃣ Simple API — quick_train()

Minimal lines.

from baya import quick_train

metrics = quick_train(
    data="data.csv",
    target="Target",
    model="linear_regression",
    test_size=0.2
)

Supported data inputs:

  • pandas DataFrame
  • CSV path
  • JSON path
  • Excel path

Automatically performs:

  • load
  • target selection
  • split
  • model creation
  • train
  • predict
  • evaluate

Returns a metrics dictionary.

2️⃣ Fluent API — Baya Class

Chainable interface.

from baya import Baya

metrics = (
    Baya("data.csv", target="Target")
    .train("linear_regression")
    .evaluate()
)

Also works with a DataFrame:

Baya(df, target="Target").train("logistic_regression").evaluate()

3️⃣ Advanced API — Project

Full modular control.

from baya import Project

project = Project()

project.data.load("data.csv")
project.data.set_target("Target")

project.split.train_test(test_size=0.2)

project.model.create("linear_regression")
project.model.train()

metrics = project.evaluate.evaluate_regressor()

All Core Methods (Advanced API)

Data:

  • project.data.load(path_or_dataframe)
  • project.data.set_target("column")
  • project.data.preview()

Split:

  • project.split.train_test(test_size=0.2)

Model:

  • project.model.create("linear_regression")
  • project.model.train()
  • project.model.predict()

Evaluate:

  • project.evaluate.evaluate_regressor()
  • project.evaluate.evaluate_classifier()
  • project.evaluate.custom_metric(...)

Tracking:

  • project.tracker.start()
  • project.tracker.log_metrics(...)
  • project.tracker.finalize()

Export:

  • project.export.csv("results.csv")
  • project.export.json("results.json")
  • project.export.excel("results.xlsx")
  • project.export.pdf("report.pdf")
  • project.export.docx("report.docx")
  • project.export.image("plot.png")

Supported Export Formats

Baya supports exporting to:

  • .csv
  • .json
  • .xlsx
  • .pdf
  • .docx
  • .png
  • .jpg

Exports available for:

  • metrics
  • predictions
  • leaderboards
  • visualizations
  • reports

AutoML

Automatic model selection.

from baya import automl

result = automl(
    data="data.csv",
    target="Target"
)

print(result["best_model"])
print(result["best_score"])

AutoML includes:

  • Cross-validation
  • Model comparison
  • Leaderboard generation
  • Best model selection
  • Run tracking
  • CV results storage

Leaderboard

Stored in: baya_runs/leaderboard.json

Visualize:

from baya.visualize import plot_leaderboard
plot_leaderboard()

Model Registry

from baya import register_model, list_models

register_model("my_model", MyModelClass)
print(list_models())

Built-in models:

  • linear_regression
  • logistic_regression
  • random_forest_classifier
  • random_forest_regressor
  • svm_classifier
  • svm_regressor

Config-Based Reproducibility

workflow.yaml:

data_path: data.csv
target: Target
model: logistic_regression
task: classification
test_size: 0.2
seed: 42

Run:

from baya import Project

project = Project.from_config("workflow.yaml")
metrics = project.run()

CLI Usage

baya info
baya run workflow.yaml
baya automl workflow.yaml
baya registry list-models
baya leaderboard
baya visualize leaderboard

Task Auto Detection

Automatically detects:

  • Regression
  • Classification

Based on the target variable.

Architecture

Layered Design:

Core Engine
↓
Orchestration (DAG)
↓
Simple API
↓
AutoML
↓
CLI

The Simple API wraps the advanced engine — no duplicated logic.

Optional Dependencies

Install extra features:

Visualization extras:

pip install bayaml[viz]

Deep learning extras:

pip install bayaml[deep]

Development tools:

pip install bayaml[dev]

Branding

baya info

Shows:

  • Framework name
  • Version
  • Author
  • Website
  • Support link

Branding is non-intrusive.

Developer Setup

git clone <repo>
cd baya
pip install -e .[dev]
pytest

License

MIT License.

About

Baya is built and maintained by Aditya Sarode, focused on scalable AI systems, ML architecture, and production-ready engineering.

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

bayaml-0.1.1.tar.gz (39.8 kB view details)

Uploaded Source

Built Distribution

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

bayaml-0.1.1-py3-none-any.whl (67.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: bayaml-0.1.1.tar.gz
  • Upload date:
  • Size: 39.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.1

File hashes

Hashes for bayaml-0.1.1.tar.gz
Algorithm Hash digest
SHA256 4f0d85f7681ebe549d327f2c9c5997d39dd2a4a6326c503a77d3e1d5bd62690a
MD5 da8fd5aedd3011ba4864bec4301e45b4
BLAKE2b-256 740a34ca45630bec7d7359e7971f74b45aef0f74a85e364762b174e02e645c80

See more details on using hashes here.

File details

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

File metadata

  • Download URL: bayaml-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 67.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.1

File hashes

Hashes for bayaml-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 3e8261f4c62fddba27fa3fbb370b2d679d0d8481aebe77154b137e0570865451
MD5 23021965889d029b772f9badf29d72e4
BLAKE2b-256 467c49d6b52080846cb3eec49820f6e6dbdb0806328dbe120895cc266a1349bb

See more details on using hashes here.

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