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.0.tar.gz (39.5 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.0-py3-none-any.whl (67.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: bayaml-0.1.0.tar.gz
  • Upload date:
  • Size: 39.5 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.0.tar.gz
Algorithm Hash digest
SHA256 89179ad661e44fb64f722b28bd73eeecabd9898d059bcffb66a2cfe9270ce233
MD5 356c7cc4f4c6e4966ca76eb229e66eee
BLAKE2b-256 29fc7a724c0ca0ea1f75aaa05851cfa98dd5fc29b0a8322d5684c2576d1a6df8

See more details on using hashes here.

File details

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

File metadata

  • Download URL: bayaml-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 67.1 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.0-py3-none-any.whl
Algorithm Hash digest
SHA256 db7f8811ff7712b743c54422162134dda3e0fa4e9a0bf442440b211cc4c3fbe5
MD5 7f4dde794704cae6d6b93b50bfab21c4
BLAKE2b-256 241f45c540a03827f21d19424bb794dc5a9784927ffa4f044679380be94d3864

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